![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | vito |
Hello, I’m newbie and I’m trying to compile godot with this module: admob (or even facebook). Here is the link:
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: android_add_dependency, android_add_java_dir, android_add_to_manifest 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