To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html. Incremental java compilation is an incubating feature. :RtspSDK:preBuild UP-TO-DATE :RtspSDK:preDebugBuild UP-TO-DATE :RtspSDK:checkDebugManifest :RtspSDK:prepareDebugDependencies :RtspSDK:compileDebugAidl UP-TO-DATE :RtspSDK:compileLint UP-TO-DATE :RtspSDK:copyDebugLint UP-TO-DATE :RtspSDK:mergeDebugShaders UP-TO-DATE :RtspSDK:compileDebugShaders UP-TO-DATE :RtspSDK:generateDebugAssets UP-TO-DATE :RtspSDK:mergeDebugAssets UP-TO-DATE :RtspSDK:mergeDebugProguardFiles UP-TO-DATE :RtspSDK:packageDebugRenderscript UP-TO-DATE :RtspSDK:compileDebugRenderscript UP-TO-DATE :RtspSDK:generateDebugResValues UP-TO-DATE :RtspSDK:generateDebugResources UP-TO-DATE :RtspSDK:packageDebugResources UP-TO-DATE :RtspSDK:processDebugManifest UP-TO-DATE :RtspSDK:generateDebugBuildConfig UP-TO-DATE :RtspSDK:processDebugResources /home/emp/android-tools/build-tools/25.0.2/aapt: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/emp/android-tools/build-tools/25.0.2/aapt) /home/emp/android-tools/build-tools/25.0.2/aapt: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/emp/android-tools/build-tools/25.0.2/lib64/libc++.so) :RtspSDK:processDebugResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':RtspSDK:processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILE
该问题出现的原因是因为libc库的版本低,CentOS 的libc版本为2.14,需要升级到CentOS 7才有支持GLIBC_2.14,如果不想升级CentOS,就需要自己编译glibc 2.14,编译的步骤: wget http://ftp.gnu.org/gnu/glibc/... tar zxvf glibc-2.14.tar.gz cd glibc-2.14 mkdir build cd build ../configure -prefix=/opt/glibc-2.14 make -j4 sudo make install export LD_LIBRARY_PATH=/opt/glibc-2.14/lib 这样就可以使用glibc 2.14了,但是aapt并没有指定使用编译的glibc-2.14,指定aapt使用glibc-2.14就可以解决上面的问题了。 首先将build tools中的aapt重命名为:aapt_ cd /path/to/build-tools mv aapt aapt_ 再新建一个脚本aapt用来指定glibc 2.14的环境变量,设置环境变量之后再启动重命名的aapt_,脚本为: #!/bin/sh echo "$0"_$@ export LD_LIBRARY_PATH=/opt/glibc-2.14/lib && "$0"_ $@ 这样就解决了上面的错误,完成了Android SDK的安装