简体   繁体   English

如何修复 Android Studio 中的构建失败错误?

[英]How to fix build failed error in Android Studio?

Does anyone know how to fix this issue in Android Studio.有谁知道如何在 Android Studio 中解决这个问题。 By the way I'm pretty new to android development & if someone could help me that would be great.顺便说一下,我对 android 开发还很陌生,如果有人可以帮助我,那就太好了。

So this is basically what I'm getting in the editor.所以这基本上就是我在编辑器中得到的。 build failed error构建失败错误

And this is my build.gradle file这是我的 build.gradle 文件

build.gradle file build.gradle 文件

I'm using Android Studio version 3.1.2我使用的是 Android Studio 3.1.2 版

Thanks in advance.提前致谢。

Looks like some linking issue is causing the error.看起来某些链接问题导致了错误。 You can try to close android studio and delete .gradle folder and .idea folder from file explorer and reopen the android studio it will recreate the directory and resolve any linking issue that are there.您可以尝试关闭 android studio 并从文件资源管理器中删除 .gradle 文件夹和 .idea 文件夹,然后重新打开 android studio,它将重新创建目录并解决存在的任何链接问题。

If this doesnt solve the issue then there may be some code error in your project.如果这不能解决问题,那么您的项目中可能存在一些代码错误。 You should check the code for any non-resolved linking issue in java or xml file..您应该检查 java 或 xml 文件中任何未解决的链接问题的代码..

暂无
暂无

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

相关问题 :appcompat:generateDebugRFile任务期间如何解决“ Android Studio构建失败:未知的android属性'MenuView'”错误 - How to fix “Android Studio build failed: Unknown android attribute 'MenuView'” error during :appcompat:generateDebugRFile task 如何修复 android 工作室中电容器的此构建错误 - How to fix this build error for capacitor in android studio 如何修复Android Studio中的gradle构建错误? - How to fix the gradle build error in android studio? 如何修复 Android Studio 中的“Android 资源链接失败”错误? - How to fix "Android resource linking failed" error in Android Studio? 如何修复 Android Studio 中的 INSTALL_FAILED_INVALID_APK 错误? - How to fix INSTALL_FAILED_INVALID_APK error in Android Studio? 如何修复无法解决 Android Studio 中库的错误? - How to fix Failed to resolve error for libraries in Android Studio? 如何修复Gradle同步失败Android Studio中的CreateProcess error = 2? (视窗) - How to fix Gradle sync failed CreateProcess error=2 in Android studio? (Windows) 如何修复Android Studio 1.4上的错误“无法解决:…” - How to fix error “Failed to resolve:…” on Android Studio 1.4 如何修复Android Studio 3.5上的``等待构建完成''错误 - How to fix 'Waiting for build to finish' error on Android Studio 3.5 如何修复 gradle 中无法在 Android Studio 中构建应用程序的错误? - How to fix error in gradle that won't build app in Android Studio?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM