与Gradle一起建造时,Firebase Messaging套件会给您带来麻烦



一开始我可以在Android设备上构建和安装该应用播放服务罐子解析器。所以我用了。

现在,在尝试构建我的应用程序时,我有一个错误。(对不起,我有一些问题了解如何插入代码段:)(

    CommandInvokationFailure: Gradle build failed. 
    /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java -classpath "/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/gradle/lib/gradle-launcher-2.14.jar" org.gradle.launcher.GradleMain "assembleRelease"
    stderr[
    /Users/andreamarchetti/Desktop/Squarcuit/Temp/gradleOut/src/main/AndroidManifest.xml:4: Error: Avoid hardcoding the debug mode; leaving it out allows debug and release builds to automatically assign one [HardcodedDebugMode]
      <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="false" android:isGame="true" android:banner="@drawable/app_banner">

说明类型" HardCodedDebugmode"类型的问题: 最好从清单中省略Android:可辩论的属性。 如果这样做,那么工具将自动插入Android:可辩论= true 建立在模拟器或设备上调试的APK时。当你 执行发布构建,例如导出APK,它将自动设置 它是错误的。

另一方面,如果您在清单文件中指定特定值, 然后工具将始终使用它。这可能导致意外发布 您的应用程序带有调试信息。

1 errors, 0 warnings
Dex: Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexException: Multiple dex files define Landroid/support/v4/accessibilityservice/AccessibilityServiceInfoCompat$AccessibilityServiceInfoVersionImpl;
        at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:591)
        at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:546)
        at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:528)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:164)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:504)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
        at com.android.dx.command.dexer.Main.run(Main.java:277)
        at com.android.dx.command.dexer.Main.main(Main.java:245)
        at com.android.dx.command.Main.main(Main.java:106)

FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':transformClassesWithDexForRelease'.
com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/bin/java'' finished with non-zero exit value 2
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
]
stdout[
Incremental java compilation is an incubating feature.
:preBuild UP-TO-DATE
:preReleaseBuild UP-TO-DATE
:checkReleaseManifest
:preDebugBuild UP-TO-DATE
:Firebase:preBuild UP-TO-DATE
:Firebase:preReleaseBuild UP-TO-DATE
:Firebase:compileReleaseNdk UP-TO-DATE
:Firebase:compileLint
:Firebase:copyReleaseLint UP-TO-DATE
:Firebase:mergeReleaseProguardFiles
:Firebase:packageReleaseRenderscript UP-TO-DATE
:Firebase:checkReleaseManifest
:Firebase:prepareReleaseDependencies
:Firebase:compileReleaseRenderscript
:Firebase:generateReleaseResValues
:Firebase:generateReleaseResources
:Firebase:packageReleaseResources
:Firebase:compileReleaseAidl
:Firebase:generateReleaseBuildConfig
:Firebase:mergeReleaseShaders
:Firebase:compileReleaseShaders
:Firebase:generateReleaseAssets
:Firebase:mergeReleaseAssets
:Firebase:processReleaseManifest
:Firebase:processReleaseResources
:Firebase:generateReleaseSources
:Firebase:incrementalReleaseJavaCompilationSafeguard
:Firebase:compileReleaseJavaWithJavac
:Firebase:processReleaseJavaRes UP-TO-DATE
:Firebase:transformResourcesWithMergeJavaResForRelease
:Firebase:transformClassesAndResourcesWithSyncLibJarsForRelease
:Firebase:mergeReleaseJniLibFolders
:Firebase:transformNative_libsWithMergeJniLibsForRelease
:Firebase:transformNative_libsWithSyncJniLibsForRelease
:Firebase:bundleRelease
:prepareAnimatedVectorDrawable2340Library
:prepareAppcompatV72340Library
:prepareCardviewV72340Library
:prepareCustomtabs2340Library
:prepareFacebookAndroidSdk4170Library
:prepareFacebookAndroidWrapper794Library
:prepareFirebaseAppUnity401Library
:prepareFirebaseCommon1100Library
:prepareFirebaseIid1100Library
:prepareFirebaseMessaging1100Library
:prepareFirebaseMessagingUnity401Library
:prepareGradleOutFirebaseUnspecifiedLibrary
:preparePlayServicesBase1100Library
:preparePlayServicesBasement1100Library
:preparePlayServicesTasks1100Library
:prepareSupportCompat2520Library
:prepareSupportCoreUi2520Library
:prepareSupportCoreUtils2520Library
:prepareSupportFragment2520Library
:prepareSupportMediaCompat2520Library
:prepareSupportV42340Library
:prepareSupportV42520Library
:prepareSupportVectorDrawable2340Library
:prepareReleaseDependencies
:compileReleaseAidl
:compileReleaseRenderscript
:generateReleaseBuildConfig
:mergeReleaseShaders
:compileReleaseShaders
:generateReleaseAssets
:mergeReleaseAssets
:generateReleaseResValues
:generateReleaseResources
:mergeReleaseResources
:processReleaseManifest
:processReleaseResources
:generateReleaseSources
:incrementalReleaseJavaCompilationSafeguard
:compileReleaseJavaWithJavac
:compileReleaseNdk UP-TO-DATE
:compileReleaseSources
:lintVitalRelease
:prePackageMarkerForRelease
:transformClassesWithDexForRelease
To run dex in process, the Gradle daemon needs a larger heap.
It currently has approximately 910 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to more than 2048 MB.
To do this set org.gradle.jvmargs=-Xmx2048M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
:transformClassesWithDexForRelease FAILED
BUILD FAILED
Total time: 45.841 secs
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.GradleWrapper.RunJava (System.String args, System.String workingdir, UnityEditor.Android.Progress progress)
UnityEditor.Android.GradleWrapper.Run (System.String workingdir, System.String task, UnityEditor.Android.Progress progress)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.HostView:OnGUI()

我没有- android:debuggable="false"-在我的项目中的任何androidmanifest.xml中的任何地方。

我认为问题是我有相同包的多个.aar文件,但版本不同。因此,Facebook SDK与一些Google Firebase的东西冲突。我删除了Facebook SDK .aar(较旧版本(。

相关内容

  • 没有找到相关文章

最新更新