Build succesful but gradle error on Framework7 vue for Android


#1

I try to build my f7 app for Android.

I run
npm run build-cordova-prod

And the build is succesful but I get the following error:

Build complete.

Android Studio project detected
ANDROID_HOME=C:\Users\adria\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_191
studio
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)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build-cordova-prod: `cross-env TARGET=cordova cross-env NODE_ENV=production node ./build/build.js && cd cordova && cordova build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] build-cordova-prod script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\adria\AppData\Roaming\npm-cache\_logs\2019-05-13T22_26_06_171Z-debug.log

I’m continuing a project that was on standby for 2 months, and it used to work fine, but for some reason now I can’t build it for Android.

Any ideas?


#2

This is a cordova related issue. Try to install latest cordova and recreate cordova project, and try again


#3

I did a fresh install of everything and now it’s solved, I can generate the debug.apk correctly, however a while ago the app installed by itself when it detected a phone connected, now it won’t install by itself.
Any clue?


#4

Came up with another way to do so, since I’m new to Cordova I struggled a bit but it’s working now.
Thanks for the quick and kind response!