尝试构建 gradle 时出现“Android 资源链接失败”错误。直到我添加了 Google 中介 SDK(它在没有中介的情况下与 GoogleMobileAds SDK 一起工作),我尝试强制解决以及我可以在网上找到的所有其他内容之前,我才出现此错误。肯定是中介 SDK。我尝试了一切,不管有没有,只要我导入任何一个 SDK,我就会收到这些错误。
我正在使用 Unity 2019.4.17f1,并按照推荐安装了所有 Unity Android 模块。我使用了最新版本的中介 SDK 和 GoogleMobileAds SDK。
使用:Google Mobile Ads v5.4.0、Facebook Unity Mediation Plugin 3.1.0、Unity Ads Mediation Plugin 2.6.0
下面写的详细错误,以及我的控制台截图。
任务 :unityLibrary:preBuild UP-TO-DATE 任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:preBuild UP-TO-DATE 任务 :launcher:preBuild UP-TO-DATE 任务 :unityLibrary:preReleaseBuild UP-TO-DATE 任务 :unityLibrary:GoogleMobileAdsPlugin。 androidlib:preReleaseBuild 最新任务:unityLibrary:checkReleaseManifest 最新任务:launcher:prepareLintJar 最新任务:unityLibrary:GoogleMobileAdsPlugin.androidlib:checkReleaseManifest 任务:unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseManifest 任务:unityLibrary: GoogleMobileAdsPlugin.androidlib:compileReleaseAidl NO-SOURCE 任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseRenderscript NO-SOURCE 任务 :unityLibrary:processReleaseManifest 任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseRenderscript 无源任务 :unityLibrary:compileReleaseAidl 无源任务 :unityLibrary:packageReleaseRenderscript 无源任务 :unityLibrary:compileReleaseRenderscript 无源任务 :unityLibrary:generateReleaseBuildConfig 最新任务 :unityLibrary:generateReleaseResValues 最新任务 :unityLibrary:generateReleaseResources 最新任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResValues 任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseResources 任务 :unityLibrary:packageReleaseResources 最新任务 :unityLibrary:prepareLintJar 最新任务 :unityLibrary:generateReleaseSources 最新任务unityLibrary:prepareLintJarForPublish 最新任务:unityLibrary:mergeReleaseShaders 最新任务:unityLibrary:compileReleaseShaders 最新任务:unityLibrary:generateReleaseAssets 最新任务:unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseResources 任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseRFile 任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseBuildConfig 任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJar 最新任务 :unityLibrary:GoogleMobileAdsPlugin 任务:unitylib:generate:GoogleMobileAdsPlugin.unitylib:generate:GoogleMobileAdsPlugin.unitylib:generate:ReleaseBuildConfig GoogleMobileAdsPlugin.androidlib:javaPreCompileRelease 任务 :unityLibrary:packageReleaseAssets 任务 :launcher:preReleaseBuild 任务 :launcher:compileReleaseAidl 无源任务 :launcher:compileReleaseRenderscript 无源任务 :launcher:checkReleaseManifest 最新任务 :launcher:generateReleaseBuildConfig UP-TO-日期任务 :launcher:generateReleaseSources 最新任务 :launcher:mainApkListPersistenceRelease 最新任务 :launcher:generateReleaseResValues 最新任务:launcher:generateReleaseResources 最新任务:unityLibrary:generateReleaseRFile 最新任务:unityLibrary:processReleaseJavaRes NO-SOURCE 任务:unityLibrary:mergeReleaseJniLibFolders 最新任务:unityLibrary:transformNativeLibleLibsUPWithM -TO-DATE 任务 :unityLibrary:transformNativeLibsWithStripDebugSymbolForRelease 最新任务 :launcher:mergeReleaseResources 最新任务 :launcher:createReleaseCompatibleScreenManifests 最新任务 :unityLibrary:transformNativeLibsWithIntermediateJniLibsForRelease 任务 :unityLibrary:AdjustRelease.Java unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibCompileRelease 任务:unityLibrary:GoogleMobileAdsPlugin.androidlib:prepareLintJarForPublish UP-TO-DATE 任务:unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseShaders Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:compileReleaseShaders Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:generateReleaseAssets Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:packageReleaseAssets Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibRuntimeRelease Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:processReleaseJavaRes无源任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:bundleLibResRelease 任务 :unityLibrary:javaPreCompileRelease 最新任务 :unityLibrary:GoogleMobileAdsPlugin.androidlib:mergeReleaseJniLibFolders 任务 :unityLibrary:compileReleaseJavaWithJavac 最新任务 :unityLibrary:bundleLibCompileRease日期任务:unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithMergeJniLibsForRelease 任务:unityLibrary:bundleLibRuntimeRelease UP-TO-DATE Task :unityLibrary:bundleLibResRelease UP-TO-DATE Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithStripDebugSymbolForRelease Task :unityLibrary:GoogleMobileAdsPlugin.androidlib:transformNativeLibsWithIntermediateJniLibsForRelease Task :launcher:processReleaseManifest Task :launcher:javaPreCompileRelease Task :launcher: processReleaseResources 失败
此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 6.0 不兼容。使用“--warning-mode all”显示各个弃用警告。请参阅https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings 51 个可操作任务:25 个已执行,26 个最新
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)