简体   繁体   English

Android Studio在M预览中找不到Aapt

[英]Android Studio can't find aapt in M preview

You have the M preview channel build tools installed (at time of writing, rev 23rc1) and you get an error something like this: 您已经安装了M预览频道构建工具(在编写本文时,修订版23rc1),并且出现类似以下错误:

Error:android-apt-compiler: 
Cannot run program ".../sdk/build-tools/23.0.0_rc1/aapt": error=2, No such file or directory

The build-tools binaries have moved (again)! 生成工具的二进制文件已经移动了(再次)! You find them now under the bin directory. 您现在可以在bin目录下找到它们。

$ ls build-tools/23.0.0_rc1/bin/
aapt                     arm-linux-androideabi-ld dexdump                  llvm-rs-cc               split-select
aidl                     bcc_compat               i686-linux-android-ld    mipsel-linux-android-ld  zipalign

So as a temporary fix, symlink them. 因此,作为临时解决方案,请对其进行符号链接。

cd $ANDROID_HOME/build-tools/23.0.0_rc1/
ln -s bin/* ./

As you say the build-tools binaries have moved. 正如您所说,构建工具二进制文件已经移动。 So, a temporary fix is open the SDK Manager and remove the Tools of Preview Channel 23rc1 and make the 22.x version as default. 因此,一个临时修复程序是打开SDK Manager并删除Preview Channel 23rc1的工具,并将22.x版本设置为默认版本。 Later Rebuild your project and done. 稍后重建项目并完成。

I hope this is useful. 我希望这是有用的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM