SConsEnvironment object has no attribute for android

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: 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 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\", line 6: env.android_add_dependency("compile ('') { exclude group: '' }")

If I open the 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

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

def configure(env):
	if (env['platform'] == 'android'):
		env.android_add_dependency("compile ('') { exclude group: '' }")
	if env['platform'] == "iphone":
		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

:bust_in_silhouette: Reply From: mokalux

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:
an empty folder named


Hope this helps.

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

vito | 2019-05-27 07:17

then you can try the precompiled templates here:

Releases · Shin-NiL/godot-custom-mobile-template · GitHub

hope this helps.

mokalux | 2019-05-27 11:32

:bust_in_silhouette: Reply From: hhflash

I had same problem. Did you solve that?

:bust_in_silhouette: Reply From: arguskos

If you are using 3.2 (latest from the git) you should use new system.