{Solved} Output APK


Ade Wale

Hi David,

After I update to version 2016.103 I started having this error message:

20 errors
FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

BUILD FAILED

Total time: 20.352 secs
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\MyPC\OneDrive\AB_Projects\Demo_Compiled\platforms\android\gradlew cdvBuildRelease -b C:\Users\MyPC\OneDrive\AB_Projects\Demo_Compiled\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
Press any key to continue . . .

What could be the solution?


DecSoft

Hello,

That's a Cordova's error, edunt, not an App Builder problem. Certainly I get some similar errors sometimes. Since my computer is not too much fast, sometimes the Java Virtual Machine cannot be initialized, then Cordova raised the appropiate error. I close some big programs and try again and commonly the error dissapear. Sometimes I also restart my computer and this kind of problems also dissapear. Try it by yourself some of these possible ways...



Ade Wale

Hi,
Thanks for quick reply. I have done what you said, even to the extent of reinstalling cordova and all same problem remains. This is really frustration when I think I just want to get simple done.

At some point, I thought it was Windows 10 causing it.


DecSoft

Hello,

But this is not an App Builder question, edunt. I can help you if you found some problem in App Builder, but, I can't help you (all the time) if the problem is in Cordova, Ant, Java, Android SDK, etc. I recommend you to start by search in Google about the problem. I am not an expert in these all software.



Ade Wale

Hi David,

It is not about YOU ARE HELP ME "(all the time)". I just want to keep you informing you about my findings. So that when other users encounter similar issues we will what is causing it. Without much saying from you, I can read the error message and diagnosed the issues.

I keep getting different error message by just rerunning: Strange indeed.

Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.afritelly.Demo
Name: Demo
Activity: MainActivity
Android target: android-23
Android project created with cordova-android@5.1.1
Fetching plugin "cordova-plugin-whitelist" via npm
Installing "cordova-plugin-whitelist" for android

This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Fetching plugin "cordova-plugin-network-information" via npm
Installing "cordova-plugin-network-information" for android
Fetching plugin "cordova-plugin-admobpro" via npm
Installing "cordova-plugin-admobpro" for android
Fetching plugin "cordova-plugin-extension" via npm
Installing "cordova-plugin-extension" for android
ANDROID_HOME=C:\AndroidSDK\sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_73

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find any version that matches com.google.android.gms:play-services-ads:+.
Searched in the following locations:
https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/maven-metadata.xml

BUILD FAILED

Total time: 12.108 secs
https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/
file:/C:/AndroidSDK/sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/maven-metadata.xml
file:/C:/AndroidSDK/sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/
Required by:
:android:unspecified

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Error: Error code 1 for command: cmd with args: /s,/c,"C:\Users\MyPC\OneDrive\AB_Projects\Demo_Compiled\platforms\android\gradlew cdvBuildRelease -b C:\Users\MyPC\OneDrive\AB_Projects\Demo_Compiled\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
Press any key to continue . . .


Ade Wale

Hi,

What caused the issue is AdMob plugin.


DecSoft

Hello,

Try with the AdMob plugin home page / documentation, specifically the Installation chapter.



Tinn Aphopchung

I guess,maybe Admob in App builder plugin is not update version(older from source)...


DecSoft

Hello,

I try right now with the AdMob sample and they works as expected. The problem is related with "com.google.android.gms:play-services-ads", then with the Cordova's AdMob plugin. Probably edunt need to assert they have installed the Cordova's AdMob plugin requisites using the Android SDK manager.



Ade Wale

@tin: You are right, that is what I assume.

@David: what prerequisite android sdk are you referring to? I have all Extra tools SDK installed.


DecSoft

Hello,

I put a link for the AdMob requisites above:

Hello,

Try with the AdMob plugin home page / documentation, specifically the Installation chapter.



Ade Wale

Hi,

Yes, I have gone through it. Another discovery for it not work is because I am using Android 5.xx that is why.


DecSoft

Hello,

Hi,

Yes, I have gone through it. Another discovery for it not work is because I am using Android 5.xx that is why.

I test the AdMob sample in my Android 4.4.2 and 5.1.1 devices and works fine edunt.



Ade Wale

Hi,
That is strange, although I saw another issue that might caused admob plugin not work at https://github.com/floatinghotpot/cordova-admob-pro/wiki/Difference-of-Plugin-IDs number 4.

Whereas all required tools are installed.


DecSoft

Hello,

If you are sure why not open a new issue in the plugin's project page?



Ade Wale
Hello,

If you are sure why not open a new issue in the plugin's project page?

Hi,

Cheers. I have posted the question and and I will get back soon as I get the answer.


Ade Wale

Hi David,

Can you update the cordova-plugin-admob (extension) to cordova-plugin-admobpro?


DecSoft

Hello,

Hi David,

Can you update the cordova-plugin-admob (extension) to cordova-plugin-admobpro?

I can't understand... the plugin works for me here. Are you tried with "cordova-plugin-admobpro" and they works? I need to study that because I am not sure right now about the differences between this two plugins. In the meanwhile, if you needed, change the ID by yourself edunt.



Ade Wale

Hi David,

Only the solution is use cordova-plugin-admobpro.

Thanks.


DecSoft

Hello,

I am not sure, but, looking at the App Builder's Javascript AdMob plugin they already uses "cordova-plugin-admobpro"...



Ade Wale

Hi David,
The issue of Cordova admob not working on my app is because I am still work on old project, yesterday when I created new project based on old project idea, and build the apk, then ran it on real device and everything worked as expected.


DecSoft

Glad to know you got it Ade!


Todo el mundo puede leer el foro de soporte de DecSoft para aprender del mismo, sin embargo, sólo los clientes de DecSoft pueden abrir nuevos hilos. Compre una o más licencias de productos de DecSoft y obtendrá este y otros beneficios.

Este sitio utiliza "cookies" útiles para almacenar sus preferencias.

Bien. Ocultar esta nota. Obtener más información.