简体   繁体   English

Android - 运行应用程序时生成失败错误

[英]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.

相关问题 运行“detox build -c android.emu.debug”时出错任务:app:compileDebugJavaWithJavac 在本机反应中失败 - error while running `detox build -c android.emu.debug` Task :app:compileDebugJavaWithJavac FAILED in react native Android 资源编译失败我构建时没有错误但在运行程序时出现错误 - Android resource compilation failed there is no error when i build but while running the program error occurs 运行android应用时出错 - Error in while running the android app 运行Android应用时出错 - Error while running android app 第一次运行Android Studio时出现构建失败错误 - I got build failed error while running Android Studio at first time 在gradle构建之后运行app时出错 - Error while running app after gradle build 在反应本机 android 中构建应用程序时无法运行应用程序(错误:任务 ':app:processDebugResources' 执行失败。) - Unable to run application while build app in react native android (Error : Execution failed for task ':app:processDebugResources'.) 在 React Native 上运行 Android Build 时出错 - Error While Running Android Build On React Native gradle构建成功,但运行时“:app:compileDebugJava FAILED” - gradle build is successful but “:app:compileDebugJava FAILED” while running 构建APK正常运行时,Android Build无法运行项目 - Android Build Failed in Running the Project While Building APK Works Fine
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM