Android jni build error

gui
#1

Hi I’m the newbie of Projucer

I have a problem about building android
My projucer version is 5.4.3 and AndroidStudio version is 3.1.4
sdk is platform-tools and sdk tools are latest version
Cmake,LLDB is latest version and NDK version is 17.2.4988734

when I create GUI Application for android and run
the error is shown up like these

What should I do for this error? could anybody help me?

Build command failed.
Error while executing process /Users/lyk/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {–build /Users/lyk/Documents/JuceAndAudio2/Builds/Android/app/.externalNativeBuild/cmake/debug_Debug/x86 --target juce_jni}
[1/17] Building C object CMakeFiles/cpufeatures.dir/Users/lyk/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures/cpu-features.c.o
[2/17] Linking C static library libcpufeatures.a
[3/17] Building CXX object CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/Source/MainComponent.cpp.o
[4/17] Building CXX object CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/Source/Main.cpp.o
[5/17] Building CXX object CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_basics.cpp.o
[6/17] Building CXX object CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_devices.cpp.o
[7/17] Building CXX object CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_formats.cpp.o
[8/17] Building CXX object CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_processors.cpp.o
FAILED: /Users/lyk/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=i686-none-linux-android --gcc-toolchain=/Users/lyk/Library/Android/sdk/ndk-bundle/toolchains/x86-4.9/prebuilt/darwin-x86_64 --sysroot=/Users/lyk/Library/Android/sdk/ndk-bundle/sysroot -DDEBUG=1 -DJUCER_ANDROIDSTUDIO_7F0E4A25=1 -DJUCE_ANDROID=1 -DJUCE_ANDROID_API_VERSION=23 -DJUCE_ANDROID_GL_ES_VERSION_3_0=1 -DJUCE_APP_VERSION=1.0.0 -DJUCE_APP_VERSION_HEX=0x10000 -DJUCE_PUSH_NOTIFICATIONS=1 -D_DEBUG=1 -Djuce_jni_EXPORTS -I…/…/…/…/…/…/…/JuceLibraryCode -I/Users/lyk/JUCE/modules -I/Users/lyk/Library/Android/sdk/ndk-bundle/sources/android/cpufeatures -isystem /Users/lyk/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++/include -isystem /Users/lyk/Library/Android/sdk/ndk-bundle/sources/android/support/include -isystem /Users/lyk/Library/Android/sdk/ndk-bundle/sources/cxx-stl/llvm-libc++abi/include -isystem /Users/lyk/Library/Android/sdk/ndk-bundle/sysroot/usr/include/i686-linux-android -D__ANDROID_API__=23 -g -DANDROID -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -mstackrealign -Wa,–noexecstack -Wformat -Werror=format-security -std=c++11 -fexceptions -frtti -fsigned-char -std=c++14 -O0 -fno-limit-debug-info -O0 -fPIC -MD -MT CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_devices.cpp.o -MF CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_devices.cpp.o.d -o CMakeFiles/juce_jni.dir/Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_devices.cpp.o -c /Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_devices.cpp
In file included from /Users/lyk/Documents/JuceAndAudio2/JuceLibraryCode/include_juce_audio_devices.cpp:9:
In file included from /Users/lyk/JUCE/modules/juce_audio_devices/juce_audio_devices.cpp:46:
In file included from /Users/lyk/JUCE/modules/juce_audio_devices/juce_audio_devices.h:54:
In file included from /Users/lyk/JUCE/modules/juce_events/juce_events.h:50:
In file included from /Users/lyk/JUCE/modules/juce_core/juce_core.h:353:
/Users/lyk/JUCE/modules/juce_core/native/juce_android_JNIHelpers.h:27:3: error: “The JUCE_ANDROID_ACTIVITY_CLASSNAME and JUCE_ANDROID_ACTIVITY_CLASSPATH macros must be set!”
#error “The JUCE_ANDROID_ACTIVITY_CLASSNAME and JUCE_ANDROID_ACTIVITY_CLASSPATH macros must be set!”

0 Likes

#2

Looks like you’re using an older version of the JUCE modules as that error in juce_android_JNIHelpers.h no longer exists. Make sure that you are using the latest Projucer and the project is pointing to the latest JUCE modules and then re-save the project.

0 Likes