[SOLVED] fail Construct 2 with admob plugin


#1

COMPILER ERROR:

/workspace/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all dependencies for configuration ‘:_debugApkCopy’.
Could not find com.google.android.gms:play-services-ads:15.0.1.
Searched in the following locations:
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
Required by:
project :

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

CORDOVA LOG:

e[36m20181021T213255 [DEBUG] AndroidBuilder -e[39m [prepare] cordova restore platforms
e[36m20181021T213255 [DEBUG] AndroidBuilder -e[39m [prepare] adding engine android@6.2.3
Subproject Path: CordovaLib
Subproject Path: CordovaLib
(node:26841) [DEP0016] DeprecationWarning: ‘root’ is deprecated, use ‘global’
e[36m20181021T213316 [DEBUG] AndroidBuilder -e[39m [prepare] cordova restore plugins
e[36m20181021T213316 [DEBUG] AndroidBuilder -e[39m [prepare] adding plugin cocoon-plugin-ads-android-admob@*
e[36m20181021T213316 [DEBUG] AndroidBuilder -e[39m [prepare] adding plugin com.ludei.defaultres.android@1.0.1
e[36m20181021T213316 [DEBUG] AndroidBuilder -e[39m [prepare] adding plugin com.ludei.installlocation.android@1.0.0
e[36m20181021T213316 [DEBUG] AndroidBuilder -e[39m [prepare] adding plugin com.ludei.usericon.android@1.0.1
e[36m20181021T213316 [DEBUG] AndroidBuilder -e[39m [prepare] adding plugin cordova-plugin-whitelist@1
e[36m20181021T213318 [DEBUG] AndroidBuilder -e[39m [build]
Warning: File /.android/repositories.cfg could not be loaded.
e[36m20181021T213320 [DEBUG] AndroidBuilder -e[39m [build] create certs folder
e[36m20181021T213320 [DEBUG] AndroidBuilder -e[39m [build] keystore
e[36m20181021T213320 [DEBUG] AndroidBuilder -e[39m [build] create build.json
e[36m20181021T213320 [DEBUG] AndroidBuilder -e[39m [build] call cordova
ANDROID_HOME=/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
Subproject Path: CordovaLib
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_3wtsk7n43wu3bkn2y8q33q1fd.run(/workspace/platforms/android/build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all dependencies for configuration ‘:_debugApkCopy’.
Could not find com.google.android.gms:play-services-ads:15.0.1.
Searched in the following locations:
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
Required by:
project :

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

BUILD FAILED

Total time: 1.769 secs
e[91m20181021T213326 [ERROR] AndroidBuilder -e[39m { Error: /workspace/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all dependencies for configuration ‘:_debugApkCopy’.
Could not find com.google.android.gms:play-services-ads:15.0.1.
Searched in the following locations:
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
Required by:
project :

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    at ChildProcess.whenDone (/workspace/platforms/android/cordova/node_modules/cordova-common/src/superspawn.js:169:23)
    at ChildProcess.emit (events.js:182:13)
    at maybeClose (internal/child_process.js:961:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
    stderr:
    ‘\nFAILURE: Build failed with an exception.\n\n* What went wrong:\nA problem occurred configuring root project ‘android’.\n> Could not resolve all dependencies for configuration ‘:_debugApkCopy’.\n > Could not find com.google.android.gms:play-services-ads:15.0.1.\n Searched in the following locations:\n file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom\n file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar\n file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar\n file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom\n file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar\n file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar\n Required by:\n project :\n\n* Try:\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\n’,
    stdout:
    ‘The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.\n\tat build_3wtsk7n43wu3bkn2y8q33q1fd.run(/workspace/platforms/android/build.gradle:137)\nThe JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.\nIncremental java compilation is an incubating feature.\nThe TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.\n\nBUILD FAILED\n\nTotal time: 1.769 secs\n’,
    code: 1 }

#2

you try use cocoon ads


#3

cocoon ads is the problem because without the cocoon ads work fine.


#4

you try cocoon ads on version 2.1.0 and cocoon ads versione 1.0.12


#5

cocoon version 2.1.0 and use canvas+


#6

if you do not want to use cocoon ads try cordova ads http://cranberrygame.github.io/ plugin works on phonegap I also think about cocoon


#7

Same problem on my end, and yes it’s the CocoonAds plugin (more the AdMob native Ads adapter).
Seems it’s missing some dependencies.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

Could not resolve all dependencies for configuration ‘:_armv7DebugApkCopy’.
Could not find com.google.android.gms:play-services-ads:15.0.1.
Searched in the following locations:
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/google/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.pom
file:/opt/cocoon_compiler/workspace/production/data/sdks/android-sdks-linux/extras/android/m2repository/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
file:/workspace/platforms/android/sdk-manager/com/google/android/gms/play-services-ads/15.0.1/play-services-ads-15.0.1.jar
Required by:
project :

@Blue_Sialia any chance to have this checked?
Thanks a lot!


#8

please how i can do it ? i need help because i want to post new indie games :frowning: send me a tutorial please


#9

In your C2 project :
You must install “Canvas+” plugin. Then, add “if Canvas+” on each “show ads” event.
In Cocoon settings:
Choose Cocoon 2.1.0. Then install admob native for android. Open config tab, edit your admob plugin version as this page --> http://blog.cocoon.io.


In-App Purchases, Billing Keys and Steak
#10

Hi @mazteen19

Yes this solves the problem by using the old version. But this version is not in line with the GDPR guidelines.
It’s essential that the new version is working or you risk to get sued.

Hopefully Ludei will address this.

Thanks!


#11

sorry but this plugin not work :confused:


#12

Thanks for your explanation. Many times i try Cocoon latest version, but sometimes work fine, sometimes error build or blackscreen.


#13

You’re welcome. Yes you are right. For the last few month, the compiler is very unstable.
Hopefully this will change.

I’m waiting since May, 2018 to update my games to apply to the GDPR, but no success so far.

Best,
Andy


#14

Hi… thanks for the ideia butao when i try compile… the Phonegap tell me to remove the Phonegap plug-in. … you have a example of a config.XML? Thanks


#15

I Will try thanks … i Will reply soon


#16

this plugin does not work I have not found a solution to make it work… you have a idea?


#17

Hi Guys,

Anyone found the solution yet?
tried to compile with all cocoon versions.
used new cocoon ads plugin also…everytime same result

Everything works fine without cocoon ads plugin.

Thanks


#18

Hi!
The problem is, that the “Native Ads Plugin for AdMob” does not find its dependencies.

> Could not resolve all dependencies for configuration ‘:_armv7DebugApkCopy’.

@Blue_Sialia any updates on this problem yet?
Thank you!


#19

i know the solution… but i’m making tests… because the construct 2 any apps don’t work i don’t know why… see ya


#20

Hi,
the problem is the Native Ads plugin, the issue is not related to Construct 2.
To bypass the issue, you can switch to an older version for now.