dropbox / djinni

A tool for generating cross-language type declarations and interface bindings.
Apache License 2.0
2.88k stars 487 forks source link

ANDROID_BUILD_TOP not set #353

Open tianyishan opened 6 years ago

tianyishan commented 6 years ago

I ran into this error while building the example code. I tried to export ANDROID_BUILD_TOP in my bash profile. Didn't work. I also browsed the previous questions. Didn't really help. I have sdk and ndk installed. So now I am really confused. Please help. Thank you.

AssertionError: $ANDROID_BUILD_TOP not set; you need to run lunch. make: [GypAndroid.mk] Error 1 jni/Android.mk:3: ../../../GypAndroid.mk: No such file or directory Traceback (most recent call last): File "deps/gyp/gyp_main.py", line 18, in sys.exit(gyp.script_main()) File "deps/gyp/pylib/gyp/init.py", line 533, in script_main return main(sys.argv[1:]) File "deps/gyp/pylib/gyp/init.py", line 526, in main return gyp_main(args) File "deps/gyp/pylib/gyp/init.py", line 511, in gyp_main generator.GenerateOutput(flat_list, targets, data, params) File "deps/gyp/pylib/gyp/generator/android.py", line 970, in GenerateOutput assert android_top_dir, '$ANDROID_BUILD_TOP not set; you need to run lunch.' AssertionError: $ANDROID_BUILD_TOP not set; you need to run lunch. make: [GypAndroid.mk] Error 1 jni/Android.mk:3: ../../../GypAndroid.mk: No such file or directory /Users/*/Library/Android/sdk/ndk-bundle/build/core/build-all.mk:87: Android NDK: WARNING: No modules to build your APP_MODULES definition is probably incorrect!
make:
No rule to make target `../../../GypAndroid.mk'. Stop.

FAILURE: Build failed with an exception.

BUILD FAILED in 8s 14 actionable tasks: 1 executed, 13 up-to-date

artwyman commented 6 years ago

If I recall correctly, you probably need to set ANDROID_NDK_HOME, or put ndk-build in your path so it can be discovered by the Makefile.