[英]Android - Build Failed error While Running an App
I am Using Android Studio 4.0
when i run my Hello App
it shows the following gradle
Error当我运行我的
Hello App
时,我正在使用Android Studio 4.0
它显示以下gradle
错误
`Build-tool 30.0.1 is missing AAPT at C:\Users\karthickyuvan\AppData\Local\Android\Sdk\build-tools\30.0.1\aapt.exe
Build-tool 30.0.1 is missing AAPT at C:\Users\karthickyuvan\AppData\Local\Android\Sdk\build-tools\30.0.1\aapt.exe
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Installed Build Tools revision 30.0.1 is corrupted. Remove and install again using the SDK Manager.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
`
The recommended this is Go to Sdk Manager and uninstall 30.0 and install again推荐这是 Go 到 Sdk 管理器并卸载 30.0 并再次安装
To fix temporary for the current Running project use临时修复当前正在运行的项目使用
Android SDK Build-Tools is a component of the Android SDK required for building Android apps. Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's installed in the /build-tools/ directory.
它安装在 /build-tools/ 目录中。
You should always keep your Build Tools component updated by downloading the latest version using the Android SDK Manager.您应该始终通过使用 Android SDK 管理器下载最新版本来更新您的构建工具组件。 If you're using Android plugin for Gradle 3.0.0 or higher, your project automatically uses a default version of the build tools that the plugin specifies.
如果您使用 Gradle 3.0.0 或更高版本的 Android 插件,您的项目会自动使用插件指定的构建工具的默认版本。 To use a different version of the build tools, specify it using buildToolsVersion in your module's build.gradle, as follows:
要使用不同版本的构建工具,请使用模块的 build.gradle 中的 buildToolsVersion 指定它,如下所示:
android {
buildToolsVersion "29.0.2"
...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.