We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build command failed. Error while executing process F:\android_sdk\cmake\3.10.2\bin\cmake.exe with arguments {--build E:\demo_project\DiDiCallCar-master\app.externalNativeBuild\cmake\debug\arm64-v8a --target native-lib} [1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/jni/native-lib.cpp.o FAILED: CMakeFiles/native-lib.dir/src/main/jni/native-lib.cpp.o F:\android_sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dnative_lib_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/native-lib.dir/src/main/jni/native-lib.cpp.o -MF CMakeFiles\native-lib.dir\src\main\jni\native-lib.cpp.o.d -o CMakeFiles/native-lib.dir/src/main/jni/native-lib.cpp.o -c ../../../../src/main/jni/native-lib.cpp ../../../../src/main/jni/native-lib.cpp:11:45: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool' originStr = env->GetStringUTFChars(str, false); ^~~~~ F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here const char GetStringUTFChars(jstring string, jboolean isCopy) ^ ../../../../src/main/jni/native-lib.cpp:25:49: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool' originStr = env->GetStringUTFChars(origin_, false); ^~~~~ F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here const char GetStringUTFChars(jstring string, jboolean isCopy) ^ ../../../../src/main/jni/native-lib.cpp:37:49: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool' originStr = env->GetStringUTFChars(origin_, false); ^~~~~ F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here const char GetStringUTFChars(jstring string, jboolean isCopy) ^ ../../../../src/main/jni/native-lib.cpp:47:49: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool' originStr = env->GetStringUTFChars(origin_, false); ^~~~~ F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here const char GetStringUTFChars(jstring string, jboolean isCopy) ^ ../../../../src/main/jni/native-lib.cpp:59:49: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool' originStr = env->GetStringUTFChars(origin_, false); ^~~~~ F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here const char GetStringUTFChars(jstring string, jboolean isCopy) ^ 5 errors generated. ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered:
布尔值的问题 要传递的非c的false我找了找语法糖 把false改成JNI_FALSE试一试
Sorry, something went wrong.
楼上方法有用
No branches or pull requests
Build command failed.
Error while executing process F:\android_sdk\cmake\3.10.2\bin\cmake.exe with arguments {--build E:\demo_project\DiDiCallCar-master\app.externalNativeBuild\cmake\debug\arm64-v8a --target native-lib}
[1/2] Building CXX object CMakeFiles/native-lib.dir/src/main/jni/native-lib.cpp.o
FAILED: CMakeFiles/native-lib.dir/src/main/jni/native-lib.cpp.o
F:\android_sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=aarch64-none-linux-android21 --gcc-toolchain=F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot -Dnative_lib_EXPORTS -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -Wa,--noexecstack -Wformat -Werror=format-security -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/native-lib.dir/src/main/jni/native-lib.cpp.o -MF CMakeFiles\native-lib.dir\src\main\jni\native-lib.cpp.o.d -o CMakeFiles/native-lib.dir/src/main/jni/native-lib.cpp.o -c ../../../../src/main/jni/native-lib.cpp
../../../../src/main/jni/native-lib.cpp:11:45: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool'
originStr = env->GetStringUTFChars(str, false);
^~~~~
F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here
const char GetStringUTFChars(jstring string, jboolean isCopy)
^
../../../../src/main/jni/native-lib.cpp:25:49: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool'
originStr = env->GetStringUTFChars(origin_, false);
^~~~~
F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here
const char GetStringUTFChars(jstring string, jboolean isCopy)
^
../../../../src/main/jni/native-lib.cpp:37:49: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool'
originStr = env->GetStringUTFChars(origin_, false);
^~~~~
F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here
const char GetStringUTFChars(jstring string, jboolean isCopy)
^
../../../../src/main/jni/native-lib.cpp:47:49: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool'
originStr = env->GetStringUTFChars(origin_, false);
^~~~~
F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here
const char GetStringUTFChars(jstring string, jboolean isCopy)
^
../../../../src/main/jni/native-lib.cpp:59:49: error: cannot initialize a parameter of type 'jboolean ' (aka 'unsigned char ') with an rvalue of type 'bool'
originStr = env->GetStringUTFChars(origin_, false);
^~~~~
F:/android_sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot/usr/include\jni.h:846:61: note: passing argument to parameter 'isCopy' here
const char GetStringUTFChars(jstring string, jboolean isCopy)
^
5 errors generated.
ninja: build stopped: subcommand failed.
The text was updated successfully, but these errors were encountered: