Error when I want to generate export template for android, how to fix it ?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By bayaola
:warning: Old Version Published before Godot 3 was released.

Hi everyone! I have an error when I want to generate export template for android With the command: scons platform=android target=release.

OUTPUT:

scons: Reading SConscript files ...
sh: 1: i586-mingw32msvc-gcc: not found
i686-w64-mingw32-gcc (GCC) 5.3.1 20160211
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

No valid target platform selected.
The following were detected:
    haiku
	server
	windows
	x11

Please run scons again with argument: platform=<string>
scons: done reading SConscript files.
scons: Building targets ...
scons: `.' is up to date.
scons: done building targets.
:bust_in_silhouette: Reply From: volzhs

You need Android SDK, NDK and JDK (JDK 8 is fine)

I have it all

bayaola | 2016-11-21 23:59

:bust_in_silhouette: Reply From: bayaola

After setting ANDROID_HOME and ANDROID_NDK_ROOT variables, now OUTPUT is:

scons: Reading SConscript files ...
sh: 1: i586-mingw32msvc-gcc: not found
i686-w64-mingw32-gcc (GCC) 5.3.1 20160211
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Godot Android!!!!! (armv7) (with neon)
AttributeError: 'SConsEnvironment' object has no attribute 'android_module_file':
  File "/home/bayaola/src-godot-2.1.1-stable/SConstruct", line 325:
    config.configure(env)
  File "./modules/GodotGoogleGamePlayServices/config.py", line 6:
    env.android_module_file("/GodotGoogleGamePlayServices.java")