GameAnalytics / GA-SDK-GODOT

Official GameAnalytics Godot SDK repository
MIT License
42 stars 7 forks source link

failure to compile android templates #14

Closed ssemakin closed 3 years ago

ssemakin commented 3 years ago

hi! My build fails to compile android templates with the following error.

Running this command:

scons platform=android target=release android_arch=arm64v8

and getting the following result immediately:

scons: Reading SConscript files ...
Checking for Android NDK...
Building for Android (arm64v8)
WARNING: android_arch=arm64v8 is not supported by ndk_platform lower than android-21; setting ndk_platform=android-21
AttributeError: 'SConsEnvironment' object has no attribute 'android_add_maven_repository':
  File ".../SConstruct", line 521:
    config.configure(env)
  File "modules/gameanalytics/config.py", line 7:
    env.android_add_maven_repository("url 'https://maven.gameanalytics.com/release'")
make: *** [bin/libgodot.android.opt.armv8.so] Error 2

I'm trying to compile sitting on the 3.3.2-stable godot commit, using MacOS, and the scons version is:

SCons by Steven Knight et al.:
    SCons: v4.1.0.post1.dc58c175da659d6c0bb3e049ba56fb42e77546cd, 2021-01-20 04:32:28, by bdbaddog on ProDog2020
    SCons path: ['/usr/local/Cellar/scons/4.1.0.post1/libexec/lib/python3.9/site-packages/SCons']
Copyright (c) 2001 - 2021 The SCons Foundation

Is it something I'm doing wrong? Thanks!

the1schwartz commented 3 years ago

For Godot 3.2.2 or higher you don't need to compile the android templates. Follow the guide here on what to do here: https://gameanalytics.com/docs/s/article/Godot-SDK-Setup

Let me know if you still have issues

ssemakin commented 3 years ago

Great, thanks! Actually I couldn't find docs on Godot on the Game Analytics site :D

One question though, I have other old-style custom Android modules that I'd need to compile but the compilation fails on the Game Analytics module. Is there a simple way to make scons ignore or "hide" the GameAnalytics module via its SCsub file when compiling other Android modules for the custom templates?

the1schwartz commented 3 years ago

I think you can add module_gameanalytics_enabled=no argument to disable it

the1schwartz commented 3 years ago

Let me know if this works for you and I will close this issue

ssemakin commented 3 years ago

Right, yes that worked! Totally forgot this option exists. Thanks and sorry about the hassle!

the1schwartz commented 3 years ago

No worries, glad I could help out :)