0 votes

Hello, I'm newbie and I'm trying to compile godot with this module: admob (or even facebook). Here is the link:

https://github.com/kloder-games/godot-admob

But I have this error when I compile:

scons platform=android target=release android_arch=arm64v8 scons: Reading SConscript files ... Building for Android (arm64v8) WARNING: android_arch=arm64v8 is not supported by ndk_platform lower than android-21; setting         ndk_platform=android-21 Using NDK unified headers Warning: module 'admob' uses a deprecated `can_build` signature in its config.py file, it should be `can_build(env, platform)`. AttributeError: 'SConsEnvironment' object has no attribute 'android_add_dependency':   File "D:\Backup\Download\godot-master\godot-master\SConstruct", line 403: config.configure(env) File "./modules/admob\config.py", line 6: env.android_add_dependency("compile ('com.google.android.gms:play-services-ads:16.0.0') { exclude group: 'com.android.support' }")

If I open the config.py of the admob module, I realized that every: androidadddependency, androidaddjavadir, androidaddtomanifest etc etc are not recognized.....
Here is the config.py:

def can_build(plat):
    return plat=="android" or plat=="iphone"

def configure(env):
    if (env['platform'] == 'android'):
        env.android_add_dependency("compile ('com.google.android.gms:play-services-ads:16.0.0') { exclude group: 'com.android.support' }")
        env.android_add_java_dir("android")
        env.android_add_to_manifest("android/AndroidManifestChunk.xml")
        env.disable_module()

    if env['platform'] == "iphone":
        env.Append(FRAMEWORKPATH=['modules/admob/ios/lib'])
        env.Append(LINKFLAGS=['-ObjC', '-framework','AdSupport', '-framework','CoreTelephony', '-framework','EventKit', '-framework','EventKitUI', '-framework','MessageUI', '-framework','StoreKit', '-framework','SafariServices', '-framework','CoreBluetooth', '-framework','AssetsLibrary', '-framework','CoreData', '-framework','CoreLocation', '-framework','CoreText', '-framework','ImageIO', '-framework', 'GLKit', '-framework','CoreVideo', '-framework', 'CFNetwork', '-framework', 'MobileCoreServices', '-framework', 'GoogleMobileAds'])

I set my system variables as:

ANDROID_NDK_HOME --->  C:\android-ndk-r19c
ANDROID_NDK_ROOT --->  C:\android-ndk-r19c
ANDROID_HOME  --->  C:\Users\Vito\AppData\Local\Android\Sdk

Where is the error? Thank you so much

asked May 26 in Engine by vito (14 points)

2 Answers

0 votes

hello there,

my config:
- android ndk latest from android studio data folder,
- latest python 3.7 (32 or 64?),
- latest scons 3.0.4

THEN I HAD TO ADD in the folder:
"C:...\AppData\Local\Android\Sdk\ndk-bundle\toolchains"
an empty folder named
"mips64el-linux-"

=> COMPILE = OK

Hope this helps.

answered May 27 by mokalux (140 points)

this is another problem I think....it is not related with mine

then you can try the precompiled templates here:

https://github.com/Shin-NiL/godot-custom-mobile-template/releases

hope this helps.

0 votes

I had same problem. Did you solve that?

answered Jun 19 by hhflash (20 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.