Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all 49069 articles
Browse latest View live

Ionic 2 error build android app

$
0
0

@ahmedmedhat187 wrote:

when build android app :

ionic cordova build android

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:processDebugResources’.

com.android.ide.common.process.ProcessException: Failed to execute aapt

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    BUILD FAILED
    Total time: 7.868 secs
    Error: cmd: Command failed with exit code 1 Error output:
    ERROR: In FontFamilyFont, unable to find attribute android:fontVariationSettings
    ERROR: In FontFamilyFont, unable to find attribute android:ttcIndex
    FAILURE: Build failed with an exception.
  • What went wrong:
    Execution failed for task ‘:processDebugResources’.

com.android.ide.common.process.ProcessException: Failed to execute aapt

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    [ERROR] An error occurred while running cordova build android (exit code 1).

ionic cordova requirements

Requirements check results for android:

Java JDK: installed 1.8.0
Android SDK: installed true
Android target: not installed
Please install Android target / API level: “android-26”.

Hint: Open the SDK manager by running: "E:\Android\sdk\tools\android.bat"
You will require:

  1. “SDK Platform” for API level android-26
  2. "Android SDK Platform-tools (latest)
  3. “Android SDK Build-tools” (latest)
    Gradle: installed C:\Program Files\Android\Android Studio1\gradle\gradle-4.1\bin\gradle
    Error: Some of requirements check failed

how to solve this problem

Posts: 1

Participants: 1

Read full topic


How to disable specific dates in ion-datetime

$
0
0

@ajaysingh13500 wrote:

hi
i want to disable certain specific dates in ion-datetime . how should i do that…
thanx in advance, any help appreciated…

Posts: 1

Participants: 1

Read full topic

Lazy Loading Invalid link error In Ionic 3

$
0
0

@greatakpo wrote:

I need to navigate from the side menu to a new page.
The side menu code is

  <ion-item nav-clear (click)="who()">
        <img src="assets/imgs/who.png" width="30" />&nbsp;&nbsp;&nbsp;<span style="font-size: 20px;">Who Are We?</span> </ion-item>

In the app.componenet.ts file , the method is

who()
  {this.nav.push('ChooseStatePage');}

The choose-state.module.ts page is

import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { ChooseStatePage } from './choose-state';

@NgModule({
  declarations: [
    ChooseStatePage,
  ],
  imports: [
    IonicPageModule.forChild(ChooseStatePage),
  ],
})
export class ChooseStatePageModule {}

while the choose-state.ts page is

import { Component } from '@angular/core';
import { IonicPage, NavController, NavParams } from 'ionic-angular';

@IonicPage()
@Component({
  selector: 'page-choose-state',
  templateUrl: 'choose-state.html',
})
export class ChooseStatePage {

  constructor(public navCtrl: NavController, public navParams: NavParams) {
  }

  ionViewDidLoad() {
    console.log('ionViewDidLoad ChooseStatePage');
  }

}

However when i click on the menu item i get an ‘Invalid Link Error’, how can i resolve it?..thanks

Posts: 2

Participants: 2

Read full topic

How to decrease speed of ionic model slid up

$
0
0

@demokumar wrote:

to show slid up animation I want to decrease the speed of model control but i cant anyone know the solution please help

Posts: 1

Participants: 1

Read full topic

Download code is not working

Get albums/videos from a facebook page

$
0
0

@GMarcoSP wrote:

Hello everyone !

I’m looking for add albums and videos from a public facebook page on my app. I already got the feeds with the developers facebook.com but i can’t get the albums and videos… Someone has a solution or have already done the same work ? i’m working in ionic 3.

Thank you in advance

Posts: 1

Participants: 1

Read full topic

Image notification using firebase in ionic 3

AngularFire2 SSL Error firebaseio.com


Is it possible to hide or show contents in a div only when an option is selected from ion-select

$
0
0

@ananthan03 wrote:

i need to display a table only when a value is selected from the options. i have been trying to get it to work for a couple of days now. can someone provide basic code or example similar to this…

Posts: 3

Participants: 2

Read full topic

Import Android API into my project

Ion-tabs switching issue after nav.setRoot on Android

$
0
0

@vkoman wrote:

Hi All.
I’m using ‘@ionic-native/network’ plugin for checking network connection.
My target platform is Android.

When the network goes disconnected, I change the navigation root, like this: this.nav.setRoot(NoInternetPage);

After network goes live, I’m changing the navigation root to page that contains ion-tabs, like this: this.nav.setRoot(TabsPage);

And the issue is that switching tabs after changing navigation root does not work on Android.

ionic info:

@ionic/cli-utils : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 7.0.0
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v6.8.1
npm               : 3.10.8
OS                : Windows 10

Environment Variables:

ANDROID_HOME : C:\Android\sdk

Misc:

backend : pro

Posts: 1

Participants: 1

Read full topic

Ionic 2 safely store api key in config.xml

$
0
0

@scottmascio2115 wrote:

I have an Ionic application that is using the cordova google maps plugin.

In my config.xml I have

<plugin name="cordova-plugin-googlemaps" spec="^2.1.1">
    <variable name="API_KEY_FOR_IOS" value=“$AFLKSDJFSD" />
    <variable name="LOCATION_WHEN_IN_USE_DESCRIPTION" value="Show your location on the map" />
    <variable name="LOCATION_ALWAYS_USAGE_DESCRIPTION" value="Trace your location on the map" />
</plugin>

I assume, but could be wrong that it is not secure to store the api key in the config.xml

Is there a best practice for storing sensitive variables in config.xml

I have seen this thread but I am still unsure how to use the supplied code in config.xml

Thanks

Posts: 1

Participants: 1

Read full topic

ERROR: Plugin 'HeaderColor' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml

Error display font-awesome in ionic2

$
0
0

@med001 wrote:

I try to install font-awesome in ionic 2 with this example:

  1. npm install font-awesome --save

  2. In package.json, add

“ionic_copy”: “./config/copy.config.js”,
“ionic_sass”: “./config/sass.config.js”,

  1. Create the below files at root level of your project and add following content.

In the file: ./config/copy.config.js Add

const copyConfig = require(’…/node_modules/@ionic/app-scripts/config/copy.config’);

copyConfig.include.push({
src: ‘{{ROOT}}/node_modules/font-awesome/fonts/’,
dest: ‘{{WWW}}/assets/fonts/’
});
In the file: ./config/sass.config.js Add

const sassConfig = require(’…/node_modules/@ionic/app-scripts/config/sass.config’);

sassConfig.includePaths.push(‘node_modules/font-awesome/scss’);
4) In ./src/theme/variables.scss

$fa-font-path: “…/assets/fonts”;
@import ‘font-awesome’;

but I have a problem in display of font-awesome on my page:

I copy fonts from node_modules/font-awesome/fonts to assets/fonts and also I copy all files from node_modules/font-awesome/scss to src/theme

How to resolve this error please?

Posts: 1

Participants: 1

Read full topic

Tab to page In ionic 3

$
0
0

@satishnavik wrote:

Hi,

I am new to Ionic and i am stuck in a issue I want open a new view from the tab page. The new view is opening in the same the tab. I want to use push for the navigation as well i tried using

let nav = this.app.getComponent(‘nav’);
nav.push(TutorialPage);

But in Ionic 3 .getComponent(‘nav’); has been removed. Any alternative would be helpful.

Thanks in advance.

Posts: 1

Participants: 1

Read full topic


Getting and displaying data using an API

$
0
0

@chambahr wrote:

Hi,
I have an API where i get data and load unto my ionic app. I have gotten the data in json format and am having troubles displaying, I have tried the *ngFor and yet can’t get it right.
The data is in the format

{status: “success”, data: {0: {}, rides: [,…], message: “I got here successfully”}}

it’s an array.
Then the ts is;

this.service.load().then( results => {
this.rides = results.data

})

and HTML

{{ ride.origin }}

for instance

from *ngFor=“let ride of rides” in ion-item

I don’t know where am getting it wrong.

Posts: 2

Participants: 2

Read full topic

Rendering Html Code in Ionic 3

$
0
0

@Chankymallick wrote:

I am getting encoded Html String from server in JSON , it can contain any kind of HTML including normal Html tags , Embeded Youtube,Instagram,Twitter links . And i want to render as it is.

As Angular restrict dynamic html rendering for security reason i used pipes and dom sanitizer as explained here.

import { Pipe, PipeTransform } from '@angular/core';
import { DomSanitizer } from '@angular/platform-browser';

@Pipe({ name: 'keepHtml', pure: false })
export class EscapeHtmlPipe implements PipeTransform {
    constructor(private sanitizer: DomSanitizer) {
    }

    transform(content) {
        return this.sanitizer.bypassSecurityTrustHtml(content);
    }
}

app.module.ts

import { EscapeHtmlPipe } from '../pipes/keep-html.pipe';

firebase.initializeApp(firebaseConfig);
@NgModule({
  declarations: [    
    EscapeHtmlPipe
  ],

usage of pipe

 <div class="articleContent" [innerHTML]="getDecodedTrimmedText(Feed.content) | keepHtml" >    
  </div>

It works with simple div,span but not with iframe and some other html tags.

Is there any way that we completely bypass this filtering and render what ever is coming in JSON ??

Posts: 1

Participants: 1

Read full topic

Trigger function upon app exit

$
0
0

@jicee13 wrote:

So I’m looking for 3 scenarios for my application…

  1. When the user is in the app everything works (obviously)

  2. When the app is either quit or put in the background (user presses home button) I want to trigger Function A

  3. When the user is in the app and simply locks there phone (doesn’t exit the app or anything) , I want to trigger Function C.

Can someone help me differentiate the 3 scenarios above?

Posts: 1

Participants: 1

Read full topic

Stay logged in after closing app

$
0
0

@a7mdFo2ad wrote:

i’m stuck in understand and using sqlite plugin for storing user data after login … i searched a lot for how to use the plugin but didn’t find any example …

Posts: 1

Participants: 1

Read full topic

NavCtrl push Ionic

$
0
0

@Quiesan wrote:

Hi !

When I tap navCtrl.push(…) and my page is already push an another moment. Does .push method create again a new View or use the past View please ?

Posts: 1

Participants: 1

Read full topic

Viewing all 49069 articles
Browse latest View live