Hi, first of all, thank you.
I want to test the extension, but I faced the issue. Trying to build the example application from GitHub I got the error:
/admob/src/ios/AdmobUtils.mm
Line 2: 'GoogleMobileAds/GoogleMobileAds.h' file not found
#import <GoogleMobileAds/GoogleMobileAds.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/admob/src/extension.cpp
Line 36: enumeration values 'EVENT_ID_ICONIFYAPP' and 'EVENT_ID_DEICONIFYAPP' not handled in switch [-Wswitch]
switch (event->m_Event) {
^
I build the application for android using dmengine.apk by pressing initialize I see the error in the console:
WARNING:ENGINE: Unknown Android input method [KeyEvent], defaulting to key events
ERROR:SCRIPT: /main/main.gui_script:67: attempt to index global 'admob' (a nil value)
stack traceback:
/main/main.gui_script:67: in function callback
/main/main.gui_script:169: in function button_click
/main/main.gui_script:189: in function </main/main.gui_script:186>
Hello, looks like something has been changed. Currently, I’m unable to build the app using Defold v1.2.180 (tried via editor and bob.jar), the error is:
/admob/src/android/java/extension/admob/AdmobUtils.java
Line 42: strings in switch are not supported in -source 6
switch (value) {
^
(use -source 7 or higher to enable strings in switch)
Line 42: Note: /tmp/job12458279080880895719/upload/admob/src/android/java/extension/admob/Extension.java uses or overrides a deprecated API.
Line 42: Note: Recompile with -Xlint:deprecation for details.
/admob/src/android/java/extension/admob/Extension.java
Line 207: strings in switch are not supported in -source 6
switch (gender) {
^
(use -source 7 or higher to enable strings in switch)
warning: [options] bootstrap class path not set in conjunction with -source 6
warning: [options] source value 6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
Yes, it works fine, but currently I cannot create signed app using the editor and should use bob.jar and it fails with the error:
Compilation failed with an internal error.
java.lang.UnsupportedOperationException
at com.android.tools.r8.h.a.a.h.a(:16)
at com.android.tools.r8.h.a.a.f.a(:227)
at com.android.tools.r8.graph.D.a(:41)
at com.android.tools.r8.dex.ApplicationReader$a.a(:12)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedCallable.exec(ForkJoinTask.java:1448)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Perhaps, it depends with Defold App Manifest generator Check parameter jetifier: true in your App Manifest file for Android target (armv7-android and arm64-android). If not setup custom manifest and add it to game.project file.
We are now defaulting to AndroidX on the build server so it is no longer needed to have an app manifest.
If you do not wish to use AndroidX and prefer to old Android support lib you can use an app manifest to disable it. I’ve updated the Android X section of the Android manual to reflect this: