Skip to content
This repository has been archived by the owner on Mar 26, 2020. It is now read-only.

ANDROID_BUILD_TOP not set #353

Open
tianyishan opened this issue Feb 13, 2018 · 1 comment
Open

ANDROID_BUILD_TOP not set #353

tianyishan opened this issue Feb 13, 2018 · 1 comment
Labels

Comments

@tianyishan
Copy link

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.

  • What went wrong:
    Execution failed for task ':app:ndkBuild'.

Process 'command '/Users/****/Library/Android/sdk/ndk-bundle/ndk-build'' finished with non-zero exit value 2

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

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

@artwyman
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants