Android Studio 错误:执行任务“:app:mergeDebugJavaResource”失败

uz75evzq  于 2022-11-16  发布在  Android
关注(0)|答案(2)|浏览(246)

我在Android Studio Java语言中构建新项目,运行“应用程序”失败,显示错误。
我安装了新程序和新窗口,但运行失败显示错误。

Executing tasks: [:app:assembleDebug] in project D:\File\Android Project\MyApplication

> Task :app:preBuild UP-TO-DATE
> Task :app:preDebugBuild UP-TO-DATE
> Task :app:generateDebugBuildConfig UP-TO-DATE
> Task :app:javaPreCompileDebug UP-TO-DATE
> Task :app:compileDebugAidl NO-SOURCE
> Task :app:compileDebugRenderscript NO-SOURCE
> Task :app:mainApkListPersistenceDebug UP-TO-DATE
> Task :app:generateDebugResValues UP-TO-DATE
> Task :app:generateDebugResources UP-TO-DATE
> Task :app:mergeDebugResources UP-TO-DATE
> Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
> Task :app:extractDeepLinksDebug UP-TO-DATE
> Task :app:processDebugManifest UP-TO-DATE
> Task :app:processDebugResources UP-TO-DATE
> Task :app:compileDebugJavaWithJavac UP-TO-DATE
> Task :app:compileDebugSources UP-TO-DATE
> Task :app:mergeDebugShaders UP-TO-DATE
> Task :app:compileDebugShaders UP-TO-DATE
> Task :app:generateDebugAssets UP-TO-DATE
> Task :app:mergeDebugAssets UP-TO-DATE
> Task :app:processDebugJavaRes NO-SOURCE
> Task :app:dexBuilderDebug
> Task :app:mergeDebugJavaResource FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > com.google.common.base.VerifyException (no error message)

* 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 6s
15 actionable tasks: 2 executed, 13 up-to-date
r1zhe5dt

r1zhe5dt1#

此代码将解决问题

android {
    packagingOptions {
        pickFirst "META-INF/DEPENDENCIES"
    }
}

android {
    packagingOptions {
        exclude "META-INF/DEPENDENCIES"
    }
}
tquggr8v

tquggr8v2#

振动式清选机
一种扑击棒
这对我有用。

相关问题