Quantcast
Channel: Ionic Forum - Latest posts
Viewing all 230394 articles
Browse latest View live

APK fails on certain systems: App not installed

$
0
0

One reason I kept hitting this was the id of the <widget> in config.xml.

Ionic-cli will use the same always:
<widget id="io.ionic.starter" ...

And if one of the test phones has another Ionic app with the same id, the installation will fail with App not installed. Other phones without an existing app with conflicting id will install the app happily.


Header fixed when keyboard push ion-content iOS

$
0
0

Sorry bro. It worked for me. I don’t know any other way :frowning:

Ionic 4.1.2 AngularFire Dependencies

$
0
0

Hi, I am using Ionic version 4.1.2 and I have an issue when running ionic serve:

[ng] WARNING in /home/brian/node_modules/@angular/core/@angular/core.es5.js
[ng] 5659:15-36 Critical dependency: the request of a dependency is an expression
[ng] WARNING in /home/brian/node_modules/@angular/core/@angular/core.es5.js
[ng] 5675:15-102 Critical dependency: the request of a dependency is an expression
[ng] ERROR in /home/brian/node_modules/angularfire2/angularfire2.js
[ng] Module not found: Error: Can't resolve '@angular/common' in '/home/brian/node_modules/angularfire2'
[ng] ERROR in /home/brian/node_modules/rxjs-compat/_esm5/Observable.js
[ng] Module not found: Error: Can't resolve 'rxjs/internal/Observable' in '/home/brian/node_modules/rxjs-compat/_esm5'
[ng] ℹ 「wdm」: Failed to compile.

More detailed here:
[https://stackoverflow.com/q/52456642/9774790](http://Issue when running ionic serve)

My question is, what is the version for the modules (such as angular, firebase) that is compatible to ionic 4.1.2?

I put my version setup here, please let me know which ones should I upgrade/downgrade.

- Linux Mint 18 Cinnamon 64-bit

  • ionic 4.1.2
  • npm 6.4.1
  • node v8.12.0

Here’s my package.json:

{
  "name": "bin",
  "version": "1.0.0",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  },
  "author": "",
  "license": "ISC",
  "description": "",
  "dependencies": {
    "@angular/core": "^4.4.6",
    "angular": "^1.7.0",
    "angularfire2": "^5.0.0-rc.9",
    "firebase": "^5.0.3",
    "npm": "^6.4.1",
    "rxjs": "^5.5.12",
    "rxjs-compat": "^6.3.2",
    "typescript": "^2.4.0"
  }
}

L'app ouvre page blanche

$
0
0

Bonjour.
avec ionic serve le chrome ouvre une page blanche.
J’ai testé sur mon smartphone avec ionic cordova run android l’app a fonctionné au depart puis le lendemain pareil page blanche.
Je n’ai aucune erreur dans la console chrome ni dans visual studio.

Quelqu’un aurait il deja eu ce probleme?

Merci d’avance

Screen white

$
0
0

I just updated and when a service is injected, the page is completely blank. If I remove the service it works fine.
I am desperate

my component:

image

my package.json

{
“name”: “sublinkProIonic4”,
“version”: “0.0.1”,
“author”: “Ionic Framework”,
“homepage”: “http://ionicframework.com/”,
“scripts”: {
“ng”: “ng”,
“start”: “ng serve”,
“build”: “ng build --prod”,
“test”: “ng test”,
“lint”: “ng lint”,
“e2e”: “ng e2e”,
“build-ionic”: “rm ./api/public/.js || true && rm ./api/public/.map || true && ionic build --prod && cp -r ./www/* ./api/public”
},
“private”: true,
“dependencies”: {
@angular/common”: “~6.1.1”,
@angular/core”: “~6.1.1”,
@angular/forms”: “~6.1.1”,
@angular/http”: “~6.1.1”,
@angular/platform-browser”: “~6.1.1”,
@angular/platform-browser-dynamic”: “~6.1.1”,
@angular/router”: “~6.1.1”,
@ionic-native/core”: “5.0.0-beta.14”,
@ionic-native/network”: “^4.12.0”,
@ionic-native/splash-screen”: “5.0.0-beta.14”,
@ionic-native/status-bar”: “5.0.0-beta.14”,
@ionic/angular”: “^4.0.0-beta.0”,
@ionic/ng-toolkit”: “^1.0.0”,
@ionic/pro”: “2.0.3”,
@ionic/schematics-angular”: “^1.0.0”,
@ionic/storage”: “^2.1.3”,
@ng-select/ng-select”: “^0.21.0”,
“angular2-image-upload”: “^1.0.0-rc.0”,
“br-mask”: “0.0.2”,
“cordova-plugin-network-information”: “^2.0.1”,
“core-js”: “^2.5.3”,
“ngx-bootstrap”: “^3.0.1”,
“rxjs”: “6.2.2”,
“rxjs-compat”: “^6.2.2”,
“zone.js”: “^0.8.5”
},
“devDependencies”: {
@angular-devkit/architect”: “~0.7.2”,
@angular-devkit/build-angular”: “~0.7.2”,
@angular-devkit/core”: “~0.7.2”,
@angular-devkit/schematics”: “~0.7.2”,
@angular/cli”: “~6.1.1”,
@angular/compiler”: “~6.1.1”,
@angular/compiler-cli”: “~6.1.1”,
@angular/language-service”: “~6.1.1”,
@ionic-native/camera”: “^4.3.3”,
@ionic-native/core”: “4.4.0”,
@ionic-native/file”: “^4.5.3”,
@ionic-native/file-transfer”: “^4.5.3”,
@types/jasmine”: “~2.8.6”,
@types/jasminewd2”: “~2.0.3”,
@types/node”: “~10.5.2”,
“codelyzer”: “~4.4.2”,
“jasmine-core”: “~2.99.1”,
“jasmine-spec-reporter”: “~4.2.1”,
“karma”: “~3.0.0”,
“karma-chrome-launcher”: “~2.2.0”,
“karma-coverage-istanbul-reporter”: “~2.0.0”,
“karma-jasmine”: “~1.1.1”,
“karma-jasmine-html-reporter”: “^0.2.2”,
“protractor”: “~5.4.0”,
“ts-node”: “~7.0.0”,
“tslint”: “~5.11.0”,
“typescript”: “^2.9.2”
},
“description”: “An Ionic project”,
“cordova”: {
“plugins”: {
“cordova-plugin-network-information”: {}
}
}
}

Screen white

$
0
0

Try remove www directory and re-run ionic serve.

L'app ouvre page blanche

Country Code Selector

$
0
0
countries:any = [
{
  code: '+91',
  name: 'India'
},
{
  code: '+1',
  name: 'America'
}
];

And then:

<ion-select [(ngModel)]="selectedCode" (ionChange)="FilterItems()" *ngFor="let c of countries">
  <ion-option value="{{c.code}}">{{c.name}}</ion-option>
</ion-select>

L'app ouvre page blanche

$
0
0

precisely I have no error message, neither in the chrome console nor on my smartphone

How to update real-time values returned from an endpoint in any view?

$
0
0

Syntax error, should be:

ionViewWillEnter(){
   this.updateBadgeResumo = Observable.interval(5000).flatMap(() => {
     return this.clienteService.getResumoFavoritoCarrinho()
   }).subscribe((response) => {
           this.resumo.quantidadeCarrinho = response.quantidadeCarrinho;
           this.resumo.quantidadeFavorito = response.quantidadeFavorito;
  })
  }```

What is this error?

$
0
0

FAILURE: Build failed with an exception.

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

com.android.build.api.transform.TransformException: java.lang.IllegalStateException: Dex archives: setting .DEX extension only for .CLASS files

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

  • Get more help at https://help.gradle.org

BUILD FAILED in 51s
at ChildProcess.whenDone (C:\Users\Harith\Desktop\Angularprojects\ionic service\myservice\platforms\android\cordova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:915:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:14300) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:14300) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

How can I access sass varible in TypeScript

$
0
0

In general there is no easy or even reasonable way to do this - probably your design is not correct, describe what need to achieve, there probably is some other way than accessing scss variables from controllers.

One solution can be converting your scss file to JSON and loading this in some service, there is a tool:
https://www.npmjs.com/package/scss-to-json

Best way to handler onesignal notification

$
0
0

Hi guys .am use service and i need best way to handler onesignal notification

Does ion-infinite-scroll only work with ?

$
0
0

Hello @epetre, i have the same issue like you. For me i don’t use a full height of my page and i would to use ion-infinite-scroll. So can you tell how you do that ?

What is this error?

$
0
0

What is your ionic info output?
What is the full output you are getting?


L'app ouvre page blanche

$
0
0

I made the plugins update but still the same

What went wrong: Execution failed for task ':app:packageRelease'

$
0
0

Thank you for the replies :slight_smile:

This is the output after a cordova build android --verbose:

No scripts found for hook "before_build".
No scripts found for hook "before_prepare".
Checking config.xml and package.json for saved platforms that haven't been added to the project
Config.xml and package.json platforms are the same. No pkg.json modification.
Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
PlatformApi successfully found for platform android
Android Studio project detected
Checking config.xml for saved plugins that haven't been added to the project
Checking for any plugins added to the project that have not been installed in android platform
No differences found between plugins added to project and installed in android platform. Continuing...
Generating platform-specific config.xml from defaults for android at /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/app/src/main/res/xml/config.xml
Merging project's config.xml into platform-specific android config.xml
Merging and updating files from [www, platforms/android/platform_www] to platforms/android/app/src/main/assets/www
Wrote out android application name "SoT Companion" to /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/app/src/main/res/values/strings.xml
Wrote out Android package name "com.rarethief.sotcompanion" to /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/app/src/main/java/com/rarethief/sotcompanion/MainActivity.java
Updating icons at platforms/android/app/src/main/res
Updating splash screens at platforms/android/app/src/main/res
This app does not have additional resource files defined
Prepared android project successfully
No scripts found for hook "after_prepare".
No scripts found for hook "before_compile".
ANDROID_HOME=/Users/aabdolla/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
studio
Subproject Path: CordovaLib
Subproject Path: app
Running command: /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/gradlew cdvBuildDebug -b /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/build.gradle -Dorg.gradle.daemon=true -Dorg.gradle.jvmargs=-Xmx2048m -Pandroid.useDeprecatedNdk=true
Starting a Gradle Daemon (subsequent builds will be faster)
publishNonDefault is deprecated and has no effect anymore. All variants are now published.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
	at build_cfmc1lssw3fv77gexjziphz26.run(/Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/app/build.gradle:143)
Configuration 'compile' in project ':app' is deprecated. Use 'implementation' instead.
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:checkDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:prepareLintJar UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:platformAttrExtractor UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:javaPreCompileDebug UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes NO-SOURCE
:CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug UP-TO-DATE
:app:preBuild UP-TO-DATE
:app:preDebugBuild UP-TO-DATE
:app:compileDebugAidl UP-TO-DATE
:CordovaLib:packageDebugRenderscript NO-SOURCE
:app:compileDebugRenderscript UP-TO-DATE
:app:checkDebugManifest UP-TO-DATE
:app:generateDebugBuildConfig
:app:prepareLintJar UP-TO-DATE
:app:generateDebugResValues UP-TO-DATE
:app:generateDebugResources UP-TO-DATE
:app:mergeDebugResources
:app:createDebugCompatibleScreenManifests
:app:processDebugManifest
:app:splitsDiscoveryTaskDebug UP-TO-DATE
:app:processDebugResources
:app:generateDebugSources
:app:javaPreCompileDebug UP-TO-DATE
:app:compileDebugJavaWithJavacNote: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/app/src/main/java/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

:app:compileDebugNdk NO-SOURCE
:app:compileDebugSources
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:app:mergeDebugShaders UP-TO-DATE
:app:compileDebugShaders UP-TO-DATE
:app:generateDebugAssets UP-TO-DATE
:app:mergeDebugAssets
:app:extractTryWithResourcesSupportJarDebug UP-TO-DATE
:app:transformClassesWithStackFramesFixerForDebug
:app:transformClassesWithDesugarForDebug
:app:transformClassesWithDexBuilderForDebug
:app:transformDexArchiveWithExternalLibsDexMergerForDebug
:app:transformDexArchiveWithDexMergerForDebug
:CordovaLib:compileDebugNdk NO-SOURCE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNativeLibsWithIntermediateJniLibsForDebug UP-TO-DATE
:app:mergeDebugJniLibFolders UP-TO-DATE
:app:transformNativeLibsWithMergeJniLibsForDebug UP-TO-DATE
:app:processDebugJavaRes NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:app:validateSigningDebug
:app:packageDebug FAILED
47 actionable tasks: 14 executed, 33 up-to-date

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> value (66135) > 0x0000ffff

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 39s
Command finished with error code 1: /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/gradlew cdvBuildDebug,-b,/Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Dorg.gradle.jvmargs=-Xmx2048m,-Pandroid.useDeprecatedNdk=true
(node:9208) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/aabdolla/Documents/rarethief_sot_map_app/IonicSoTCompanion_Android/platforms/android/app/src/main/java/org/apache/cordova/file/AssetFilesystem.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> value (66135) > 0x0000ffff

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

* Get more help at https://help.gradle.org

BUILD FAILED in 2m 39s

I will try updating my cordova in the meantime but I feel like that won’t fix the problem since it can build without all the new images I added. Who knows!

Dismiss modal on tab click

$
0
0

I have 4 tabs in an app.In the second tab i have a modal when we click some button and from that modal we will navigate to second modal in the same tab.But,when we press the other tabs the modal should hide either if it is a first modal or second modal.

Creating custom components always gets template parse errors

$
0
0

I just want to create a simple component from the ionic cli

ionic g component google-map

This is my app.module.ts file

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { Geolocation } from '@ionic-native/geolocation';

import { MyApp } from './app.component';


import { HomePage } from '../pages/home/home';
import { GeotagPage } from '../pages/geotag/geotag';
import { GoogleMapPage } from '../pages/google-map/google-map';

import { GeotagPageModule } from '../pages/geotag/geotag.module';
import { GoogleMapPageModule } from '../pages/google-map/google-map.module';

import { GooglemapComponent } from '../components/googlemap/googlemap';

@NgModule({
  declarations: [
    MyApp,
    HomePage,
    GooglemapComponent
  ],
  imports: [
    BrowserModule,
    IonicModule.forRoot(MyApp),
    GeotagPageModule,
    GoogleMapPageModule
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    MyApp,
    HomePage,
    GeotagPage,
    GoogleMapPage
  ],
  providers: [
    StatusBar,
    Geolocation,
    SplashScreen,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ],
})
export class AppModule {}

my component file.ts

import { Component } from '@angular/core';

/**
 * Generated class for the GooglemapComponent component.
 *
 * See https://angular.io/api/core/Component for more info on Angular
 * Components.
 */
@Component({
  selector: 'googlemap',
  templateUrl: 'googlemap.html'
})
export class GooglemapComponent {

  text: string;

  constructor() {
    console.log('Hello GooglemapComponent Component');
    this.text = 'Hello World';
  }

}

and lastly the component.module.ts

import { NgModule } from '@angular/core';
import { GooglemapComponent } from './googlemap/googlemap';
@NgModule({
	declarations: [GooglemapComponent],
	imports: [],
	exports: [GooglemapComponent]
})
export class ComponentsModule {}

I dont know whats wrong with creating a simple component it keeps telling me

Template parse errors: ‘googlemap’ is not a known element:1.

Can someone tell me on what wrong with this? Anyone that can guide me through this

What is this error?

$
0
0

this is full output error . am try to run this cooman “ionic cordova build android”

Viewing all 230394 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>