Android编译环境报错记录

一、报错出现了

build/core/host_shared_library_internal.mk:44: recipe for target 'out/host/linux-x86/obj/lib/libc++.so' failed

解决方案:

  1.art/build/Android.common_build.mk中把true改为false

# Host.
ART_HOST_CLANG := false
ifneq ($(WITHOUT_HOST_CLANG),false)          #ture--->false
# By default, host builds use clang for better warnings.
ART_HOST_CLANG := ture
endif

 2 执行命令,更改链接指向 

ln -sf /usr/bin/ld.gold prebuilts/gcc/linux-x86/host/x86_64-linux-glibc2.11-4.6/x86_64-linux/bin/ld

二、报错出现了

vendor/qcom/proprietary/mm-still/ipl/Android.mk:16  recipe commences before first target。 停止

解决方法:

打开 vendor/qcom/proprietary/mm-still/ipl/Android.mk: 发现原来是15行缺少换行符

将 -D__alignx/(x/)=__attribute__/(/(__aligned__/(x/)/)/) 改为

-D__alignx/(x/)=__attribute__/(/(__aligned__/(x/)/)/) /
三、执行命令 ./gradlew tasks时出现错误

Could not resolve all files for configuration ‘:classpath’. 
Could not find com.android.tools.build:gradle:3.0.0. 
Searched in the following locations: 
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom  
https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.jar  
Required by: 
project :* Try: 

Run with –stacktrace option to get the stack trace. Run with –debug option to get more log output.

解决方法:在project的builde.gradle做如下操作分别加上google(),因为关于gradle的升级后,所需要的开源库,不一定在jcenter()库中能找到,可以在google()服务器上找到相应的开源库



你可能感兴趣的:(Android编译环境报错记录)