I have some error when I want to compile my ionic4 project app to my android phone. When I running "ionic Cordova run android", it shows me the error, so the app can't be running/installed on my phone. Please help me. thanks
This is the error code:
BUILD SUCCESSFUL in 1s
1 actionable task: 1 executed Subproject Path: CordovaLib Subproject Path: app Exception in thread "main" java.lang.NullPointerException at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:38) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:26) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) cmd: Command failed with exit code 1 Error output: Exception in thread "main" java.lang.NullPointerException at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:38) at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:26) at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:108) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) [ERROR] An error occurred while running subprocess cordova.
Cordova runs android exited with exit code 1.
Re-running this command with the --verbose flag may provide more information.
1.remove android platform using
ionic cordova platform remove android
remove manually node-modules
and package-lock.json
(imp*)
Unistall old Application
npm cache clean --force
Run npm install
Finally ionic cordova run android
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.