Scons not found android_add_java_dir

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By vito

If I try to build godot with an andorid module I receive the title error or better the following one:

 'SConsEnvironment' object has no attribute android_add_java_dir

I set my system variables as:

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

But Scons is like is not able to find android what I’m doing wrong?
I’m able to correctly build android without any module

:bust_in_silhouette: Reply From: volzhs

android build is changed recently on master branch.

if you follow this tutorial, you need to checkout 3.1 branch, not master.

if you want to use master branch, you need to follow this article.

I’m not creating a module I’m just trying to install one (admob or facebook integration). So my error is in building phase…

vito | 2019-05-27 11:58

I’m downloading the 3.1 branch

vito | 2019-05-27 11:59

It seems working, It is building but I don’t understand why with the master it doesn’t work, Can you explain me better? I cannot follow the links, I don’t understand them well

vito | 2019-05-27 12:13

Android build is changed for the new android plugin system.
with master(3.2), android module can be installed via assetlib, like admob
no need to recompile the whole godot engine source.

volzhs | 2019-05-27 12:55