Closed RohitVerma882 closed 2 years ago
When i compile Android-12 aapt source code then it can run on android version 5,6,7,8,... devices or not??
You can download the compiled binaries for testing, they are all statically linked and should work fine.
Ok, thanks
Why generated lib size is too high
Why generated lib size is too high
llvm-strip -g .a strip -g .a
Why generated lib size is too high
llvm-strip -g .a strip -g .a
Thanks
Error when compling aidl
Error when compling aidl
redownload sdk-tools-source.zip
and compile with ndk-r23b
NDK_TOOLCHAIN=/path/to/android-ndk-r23/toolchains/llvm/prebuilt/linux-x86_64
cmake -G 'Ninja' \
-DCMAKE_C_COMPILER=$NDK_TOOLCHAIN/bin/aarch64-linux-android30-clang \
-DCMAKE_CXX_COMPILER=$NDK_TOOLCHAIN/bin/aarch64-linux-android30-clang++ \
-DCMAKE_SYSROOT=$NDK_TOOLCHAIN/sysroot \
-DCMAKE_BUILD_TYPE=Release \
..
# patch aidl_language_y.h
ninja patch
ninja -j16
It doesn't working, Others way to patch aidl_language_y.h ???
It doesn't working, Others way to patch aidl_language_y.h ???
modify the aidl_language_y.h
// add these two lines at the end of the file
typedef union yy::parser::value_type YYSTYPE;
typedef yy::parser::location_type YYLTYPE;
It doesn't working, Others way to patch aidl_language_y.h ???
modify the
aidl_language_y.h
// add these two lines at the end of the file typedef union yy::parser::value_type YYSTYPE; typedef yy::parser::location_type YYLTYPE;
Same happened
aapt, aapt2 link error
Getting error while compiling for x86 and x86_64
Getting error while compiling for x86 and x86_64
modify the src/boringssl/CMakeLists.txt
, start at line 500
# set ARCH and MARCH
set(MARCH)
if(ANDROID_ABI MATCHES "arm64-v8a")
set(ARCH "aarch64")
set(MARCH "aarch64")
elseif(ANDROID_ABI MATCHES "armeabi-v7a")
set(ARCH "arm")
set(MARCH ${ANDROID_ABI})
elseif(ANDROID_ABI MATCHES "x86")
set(ARCH "x86")
set(MARCH "i386")
else(ANDROID_ABI MATCHES "x86_64")
set(ARCH "x86_64")
set(MARCH ${ANDROID_ABI})
endif()
# set -march flag == ${MARCH}
if(ANDROID AND NOT ANDROID_NDK_REVISION AND ARCH STREQUAL "arm")
# The third-party Android-NDK CMake files somehow fail to set the -march flag
# for assembly files. Without this flag, the compiler believes that it's
# building for ARMv5.
set(CMAKE_ASM_FLAGS "-march=${MARCH} ${CMAKE_ASM_FLAGS}")
endif()
build.sh
# ANDROID_ABI = arm64-v8a, armeabi-v7a, x86, x86_64
cmake -G 'Ninja' \
-DCMAKE_C_COMPILER=$NDK_TOOLCHAIN/bin/i686-linux-android30-clang \
-DCMAKE_CXX_COMPILER=$NDK_TOOLCHAIN/bin/i686-linux-android30-clang++ \
-DCMAKE_SYSROOT=$NDK_TOOLCHAIN/sysroot \
-DCMAKE_BUILD_TYPE=Release \
-DANDROID_ABI=x86
..
I just tested aapt2 briefly, there may be other errors, please refer to the corresponding Android.bp and CMakeLists.txt to modify
clang-12: error: the clang compiler does not support '-march=i686'
clang-12: error: the clang compiler does not support '-march=i686'
Sorry, there is an error in the above command, it should be for x86
-DCMAKE_C_COMPILER=$NDK_TOOLCHAIN/bin/i686-linux-android30-clang \
-DCMAKE_CXX_COMPILER=$NDK_TOOLCHAIN/bin/i686-linux-android30-clang++ \
Thanks, it worked.
adb linking error
adb linking error
This is last error!
not generating cpp files correctly, for cross compiling you need host protoc
put the aarch64 protoc executable in your x86 build/bin
directory
no need to execute the ninja protoc
command for cross compilation
When i compile Android-12 aapt source code then it can run on android version 5,6,7,8,... devices or not??