I know that we already discussed similar problem here but now the same problem occurs, but I couldn’t identify why. Does someone know help me why my apk is generated, installed into Android, but after clicked on app appears the message “myApp has stopped”?
I’ve followed whole instructions of How to update Cordova CLI, Platforms and Plugins, but nothing.
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ ionic info
✔ Gathering environment info - done!
Ionic:
ionic (Ionic CLI) : 4.1.2 (/usr/local/lib/node_modules/ionic)
Ionic Framework : ionic-angular 3.9.2
@ionic/app-scripts : 3.2.0
Cordova:
cordova (Cordova CLI) : 8.0.0
Cordova Platforms : android 7.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.1.2, cordova-plugin-ionic-webview 1.2.1, (and 5 other plugins)
System:
NodeJS : v8.10.0 (/usr/bin/node)
npm : 6.4.1
OS : Linux 4.15
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ ionic cordova requirements
> cordova requirements
Android Studio project detected
Requirements check results for android:
Java JDK: installed 1.8.0
Android SDK: installed true
Android target: installed android-28,android-27,android-24
Gradle: installed /usr/local/android-studio/gradle/gradle-4.4/bin/gradle
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ npm info cordova version
8.0.0
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ cordova -v
8.0.0
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ cordova platform list
Installed platforms:
android 7.1.1
Available platforms:
browser ~5.0.1
ios ~4.5.4
osx ~4.0.1
windows ~5.0.0
www ^3.12.0
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ npm info cordova-android version
7.1.1
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ npm outdated
Package Current Wanted Latest Location
rxjs 5.5.7 5.5.7 6.3.2 MyApp
@angular/animations 5.2.9 5.2.9 6.1.7 MyApp
@angular/common 5.2.9 5.2.9 6.1.7 MyApp
@angular/compiler 5.2.9 5.2.9 6.1.7 MyApp
@angular/compiler-cli 5.2.9 5.2.9 6.1.7 MyApp
@angular/core 5.2.9 5.2.9 6.1.7 MyApp
@angular/forms 5.2.9 5.2.9 6.1.7 MyApp
@angular/http 5.2.9 5.2.9 6.1.7 MyApp
@angular/platform-browser 5.2.9 5.2.9 6.1.7 MyApp
@angular/platform-browser-dynamic 5.2.9 5.2.9 6.1.7 MyApp
@ionic-native/base64 4.5.3 4.5.3 4.14.0 MyApp
@ionic-native/core 4.5.3 4.5.3 4.14.0 MyApp
@ionic-native/firebase 4.5.3 4.5.3 4.14.0 MyApp
@ionic-native/network 4.5.3 4.5.3 4.14.0 MyApp
@ionic-native/splash-screen 4.5.3 4.5.3 4.14.0 MyApp
@ionic-native/status-bar 4.5.3 4.5.3 4.14.0 MyApp
@ionic/storage 2.1.3 2.1.3 2.2.0 MyApp
ansi-regex 3.0.0 3.0.0 4.0.0 MyApp
ionicons 3.0.0 3.0.0 4.4.3 MyApp
rxjs 5.5.7 5.5.7 6.3.2 MyApp
zone.js 0.8.20 0.8.20 0.8.26 MyApp
undefined
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ cordova plugin list
com-badrit-base64 0.2.0 "Base64"
cordova-plugin-device 2.0.2 "Device"
cordova-plugin-firebase 1.1.2 "Google Firebase Plugin"
cordova-plugin-ionic-keyboard 2.1.2 "cordova-plugin-ionic-keyboard"
cordova-plugin-ionic-webview 1.2.1 "cordova-plugin-ionic-webview"
cordova-plugin-network-information 2.0.1 "Network Information"
cordova-plugin-splashscreen 5.0.2 "Splashscreen"
cordova-plugin-whitelist 1.3.3 "Whitelist"
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ cordova-check-plugins
**********************
* Up-to-date plugins *
**********************
plugin: cordova-plugin-whitelist
source: npm://cordova-plugin-whitelist@^1.3.3
installed version: 1.3.3
remote version: 1.3.3
plugin: cordova-plugin-device
source: npm://cordova-plugin-device@^2.0.2
installed version: 2.0.2
remote version: 2.0.2
plugin: cordova-plugin-splashscreen
source: npm://cordova-plugin-splashscreen@^5.0.2
installed version: 5.0.2
remote version: 5.0.2
plugin: cordova-plugin-ionic-webview
source: npm://cordova-plugin-ionic-webview@^1.2.1
installed version: 1.2.1
remote version: 1.2.1
plugin: cordova-plugin-ionic-keyboard
source: npm://cordova-plugin-ionic-keyboard@^2.1.2
installed version: 2.1.2
remote version: 2.1.2
plugin: com-badrit-base64
source: npm://com-badrit-base64@^0.2.0
installed version: 0.2.0
remote version: 0.2.0
plugin: cordova-plugin-network-information
source: npm://cordova-plugin-network-information@^2.0.1
installed version: 2.0.1
remote version: 2.0.1
***************************
* Plugin update available *
***************************
plugin: cordova-plugin-firebase
source: npm://cordova-plugin-firebase@^2.0.1
installed version: 1.1.2
remote version: 2.0.2
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ cordova plugin remove cordova-plugin-firebase
Uninstalling cordova-plugin-firebase from android
Android Studio project detected
missing file :: app/src/main
Error during processing of action! Attempting to revert...
(node:6352) UnhandledPromiseRejectionWarning: Error: Uh oh!
ENOENT: no such file or directory, open '/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/AndroidManifest.xml'
at Object.fs.openSync (fs.js:646:18)
at Object.fs.readFileSync (fs.js:551:33)
at Object.parseElementtreeSync (/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/cordova/node_modules/cordova-common/src/util/xml-helpers.js:180:27)
at new AndroidManifest (/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/cordova/lib/AndroidManifest.js:29:20)
at AndroidProject.getPackageName (/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/cordova/lib/AndroidProject.js:99:12)
at AndroidProject.getCustomSubprojectRelativeDir (/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/cordova/lib/AndroidProject.js:105:28)
at uninstall (/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/cordova/lib/pluginHandlers.js:131:46)
at ActionStack.process (/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/cordova/node_modules/cordova-common/src/ActionStack.js:56:25)
at PluginManager.doOperation (/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:114:20)
at PluginManager.removePlugin (/home/rodrigo/Projetos/MyApp/ionic/MyApp/platforms/android/cordova/node_modules/cordova-common/src/PluginManager.js:148:17)
(node:6352) 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:6352) [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.
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ cordova plugin add cordova-plugin-firebase
Plugin "cordova-plugin-firebase" already installed on android.
Adding cordova-plugin-firebase to package.json
Saved plugin info for "cordova-plugin-firebase" to config.xml
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$ cat package.json
{
"name": "MyApp",
"version": "0.0.1",
"author": "Ionic Framework",
"homepage": "http://ionicframework.com/",
"private": true,
"scripts": {
"clean": "ionic-app-scripts clean",
"build": "ionic-app-scripts build",
"lint": "ionic-app-scripts lint",
"ionic:build": "ionic-app-scripts build",
"ionic:serve": "ionic-app-scripts serve"
},
"dependencies": {
"@angular/animations": "5.2.9",
"@angular/common": "5.2.9",
"@angular/compiler": "5.2.9",
"@angular/compiler-cli": "5.2.9",
"@angular/core": "5.2.9",
"@angular/forms": "5.2.9",
"@angular/http": "5.2.9",
"@angular/platform-browser": "5.2.9",
"@angular/platform-browser-dynamic": "5.2.9",
"@ionic-native/base64": "4.5.3",
"@ionic-native/core": "4.5.3",
"@ionic-native/firebase": "4.5.3",
"@ionic-native/network": "4.5.3",
"@ionic-native/splash-screen": "4.5.3",
"@ionic-native/status-bar": "4.5.3",
"@ionic/app-scripts": "^3.2.0",
"@ionic/storage": "2.1.3",
"angularfire2": "^5.0.1",
"ansi-regex": "^3.0.0",
"browserslist": "^4.1.1",
"ci-info": "^1.5.1",
"cli-table3": "^0.5.1",
"com-badrit-base64": "^0.2.0",
"cordova-android": "7.1.1",
"cordova-plugin-device": "^2.0.2",
"cordova-plugin-firebase": "^2.0.1",
"cordova-plugin-ionic-keyboard": "^2.1.2",
"cordova-plugin-ionic-webview": "^2.1.4",
"cordova-plugin-network-information": "^2.0.1",
"cordova-plugin-splashscreen": "^5.0.2",
"cordova-plugin-whitelist": "^1.3.3",
"figgy-pudding": "^3.5.1",
"firebase": "^5.5.0",
"highcharts": "^6.1.3",
"hoek": "^5.0.4",
"ionic-angular": "3.9.2",
"ionicons": "3.0.0",
"is-fullwidth-code-point": "^2.0.0",
"libcipm": "^3.0.2",
"mime-types": "^2.1.20",
"node-pre-gyp": "^0.11.0",
"npm": "^6.4.1",
"npm-profile": "^4.0.1",
"opener": "^1.5.1",
"rxjs": "5.5.7",
"rxjs-compat": "^6.3.2",
"strip-ansi": "^4.0.0",
"sw-toolbox": "3.6.0",
"typescript": "^3.0.3",
"zone.js": "0.8.20"
},
"devDependencies": {
"@ionic/app-scripts": "3.1.8",
"rxjs": "^6.3.2",
"typescript": "~2.6.2"
},
"description": "An Ionic project",
"cordova": {
"plugins": {
"cordova-plugin-firebase": {},
"com-badrit-base64": {},
"cordova-plugin-whitelist": {},
"cordova-plugin-device": {},
"cordova-plugin-splashscreen": {},
"cordova-plugin-ionic-webview": {},
"cordova-plugin-ionic-keyboard": {},
"cordova-plugin-network-information": {}
},
"platforms": [
"android"
]
}
}
rodrigo@rf511:~/Projetos/MyApp/ionic/MyApp$
I’ve tried to install cordova-plugin-firebase version 2.0.2 after ran cordova-check-plugins, but an error happens.
After install all latest package versions suggested from npm outdated until it command not return more suggestions, the result is the same “myApp has stopped”.
Suggestions?