android
android copied to clipboard
unknown type name 'int8_t'
Environment ndk-bundle: Pkg.Desc = Android NDK Pkg.Revision = 20.0.5594570 idea=Android studio 3.4.1 jdk=1.8
Describe the bug I try build android-runtime error! build this project need what ndk version? or should change what config?
logs:
error1:
Configure project :app + setting applicationId + couldn't load user-defined configuration from /Users/mc/Documents/workspace/github/app/App_Resources/Android/app.gradle. File doesn't exist. + using andorid X library androidx.legacy:legacy-support-v4:1.0.0
error2:
FAILED: /Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=i686-none-linux-android17 --gcc-toolchain=/Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64 --sysroot=/Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DAPPLICATION_IN_DEBUG -DNativeScript_EXPORTS -I../../../../src/main/cpp/include/libc++ -I../../../../src/main/cpp -I../../../../src/main/cpp/include -I../../../../src/main/cpp/v8_inspector -I../../../../src/main/libs/x86/include -std=c++11 -Werror -Wno-unused-result -mstackrealign -fexceptions -fno-builtin-stpcpy -fno-rtti -D_LIBCPP_ABI_VERSION=Cr -D_LIBCPP_ENABLE_NODISCARD -D_LIBCPP_ABI_UNSTABLE -g -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/NativeScript.dir/src/main/cpp/AssetExtractor.cpp.o -MF CMakeFiles/NativeScript.dir/src/main/cpp/AssetExtractor.cpp.o.d -o CMakeFiles/NativeScript.dir/src/main/cpp/AssetExtractor.cpp.o -c /Users/mc/Documents/workspace/github/android-runtime/test-app/runtime/src/main/cpp/AssetExtractor.cpp In file included from /Users/mc/Documents/workspace/github/android-runtime/test-app/runtime/src/main/cpp/AssetExtractor.cpp:1: /Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/jni.h:31:9: error: unknown type name 'uint8_t' typedef uint8_t jboolean; /* unsigned 8 bits / ^ /Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/jni.h:32:9: error: unknown type name 'int8_t' typedef int8_t jbyte; / signed 8 bits / ^ /Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/jni.h:33:9: error: unknown type name 'uint16_t' typedef uint16_t jchar; / unsigned 16 bits / ^ /Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/jni.h:34:9: error: unknown type name 'int16_t' typedef int16_t jshort; / signed 16 bits / ^ /Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/jni.h:35:9: error: unknown type name 'int32_t' typedef int32_t jint; / signed 32 bits / ^ /Users/mc/Library/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/jni.h:36:9: error: unknown type name 'int64_t' typedef int64_t jlong; / signed 64 bits */ ^
I try change exclude src/main/cpp/include/libc++ ! project can build but missing some function!but not unknown type name 'int8_t' !
include_directories( # V8 uses a custom STL compiled with the LIBCPP_ABI_UNSTABLE flag. To maintain the ABI # compatibility we use this same STL headers for building the runtime # src/main/cpp/include/libc++ src/main/cpp src/main/cpp/include src/main/cpp/v8_inspector # This folder contains V8's built-in natives and snapshot blobs src/main/libs/${ANDROID_ABI}/include )
@firmlyshell, we haven't tested building the runtime with NDK r20 (20.0.5594570). Can you try building it with NDK 19c (19.2.5345600)?
This isn’t an issue again however I saw a similar issue in another project, the was reorganizing the includes