Start a new topic

Error when build Android

Hello,

I try to use your SDK for Unity to build a simple test project for image tracking on Android.

But when I launch the build I have this errors :

image


_

image


> Configure project :launcher

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only


> Task :launcher:preBuild UP-TO-DATE

> Task :unityLibrary:preBuild UP-TO-DATE

> Task :unityLibrary:preReleaseBuild UP-TO-DATE

> Task :launcher:prepareLintJar UP-TO-DATE

> Task :unityLibrary:checkReleaseManifest

> Task :unityLibrary:processReleaseManifest

> Task :unityLibrary:compileReleaseAidl NO-SOURCE

> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE

> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE

> Task :unityLibrary:generateReleaseBuildConfig

> Task :unityLibrary:generateReleaseResValues

> Task :unityLibrary:generateReleaseResources

> Task :unityLibrary:packageReleaseResources

> Task :launcher:preReleaseBuild

> Task :launcher:compileReleaseAidl NO-SOURCE

> Task :launcher:compileReleaseRenderscript NO-SOURCE

> Task :launcher:checkReleaseManifest

> Task :launcher:generateReleaseBuildConfig

> Task :launcher:generateReleaseSources

> Task :unityLibrary:generateReleaseRFile

> Task :unityLibrary:prepareLintJar UP-TO-DATE

> Task :launcher:mainApkListPersistenceRelease

> Task :unityLibrary:generateReleaseSources

> Task :launcher:generateReleaseResValues

> Task :launcher:generateReleaseResources

> Task :unityLibrary:javaPreCompileRelease


> Task :unityLibrary:compileReleaseJavaWithJavac


> Task :unityLibrary:bundleLibCompileRelease

> Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE

> Task :unityLibrary:mergeReleaseShaders

> Task :unityLibrary:compileReleaseShaders

> Task :unityLibrary:generateReleaseAssets

> Task :unityLibrary:packageReleaseAssets

> Task :unityLibrary:bundleLibRuntimeRelease

> Task :unityLibrary:processReleaseJavaRes NO-SOURCE

> Task :unityLibrary:bundleLibResRelease

> Task :unityLibrary:mergeReleaseJniLibFolders

> Task :launcher:mergeReleaseResources

> Task :launcher:javaPreCompileRelease

> Task :launcher:createReleaseCompatibleScreenManifests


> Task :launcher:processReleaseManifest FAILED


See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.



> Task :unityLibrary:transformNativeLibsWithMergeJniLibsForRelease


Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.

Use '--warning-mode all' to show the individual deprecation warnings.

See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

28 actionable tasks: 25 executed, 3 up-to-date


UnityEngine.GUIUtility:ProcessEvent (int,intptr)


_

image


Note: D:\0_test\New Test Wikitude Android\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

[:core-1.24.0:] C:\Users\bperrote\.gradle\caches\transforms-2\files-2.1\a723e1513055ccad2098571b45ae0c2f\AndroidManifest.xml:30:9-54 Error:

 Missing 'package' key attribute on element package at [:core-1.24.0:] AndroidManifest.xml:30:9-54

[:core-1.24.0:] C:\Users\bperrote\.gradle\caches\transforms-2\files-2.1\a723e1513055ccad2098571b45ae0c2f\AndroidManifest.xml Error:

 Validation failed, exiting


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':launcher:processReleaseManifest'.

> Manifest merger failed with multiple errors, see logs


* 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 3s

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8


UnityEngine.GUIUtility:ProcessEvent (int,intptr)



_

image

CommandInvokationFailure: Gradle build failed. 

C:/Program Files/Unity/Hub/Editor/2019.4.30f1/Editor/Data/PlaybackEngines/AndroidPlayer\OpenJDK\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"


stderr[

Note: D:\0_test\New Test Wikitude Android\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.

Note: Recompile with -Xlint:deprecation for details.

[:core-1.24.0:] C:\Users\bperrote\.gradle\caches\transforms-2\files-2.1\a723e1513055ccad2098571b45ae0c2f\AndroidManifest.xml:30:9-54 Error:

 Missing 'package' key attribute on element package at [:core-1.24.0:] AndroidManifest.xml:30:9-54

[:core-1.24.0:] C:\Users\bperrote\.gradle\caches\transforms-2\files-2.1\a723e1513055ccad2098571b45ae0c2f\AndroidManifest.xml Error:

 Validation failed, exiting


FAILURE: Build failed with an exception.


* What went wrong:

Execution failed for task ':launcher:processReleaseManifest'.

> Manifest merger failed with multiple errors, see logs


* 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 3s

Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8

]

stdout[


> Configure project :launcher

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only

Exception while marshalling C:\Program Files\Unity\Hub\Editor\2019.4.30f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only


> Task :launcher:preBuild UP-TO-DATE

> Task :unityLibrary:preBuild UP-TO-DATE

> Task :unityLibrary:preReleaseBuild UP-TO-DATE

> Task :launcher:prepareLintJar UP-TO-DATE

> Task :unityLibrary:checkReleaseManifest

> Task :unityLibrary:processReleaseManifest

> Task :unityLibrary:compileReleaseAidl NO-SOURCE

> Task :unityLibrary:packageReleaseRenderscript NO-SOURCE

> Task :unityLibrary:compileReleaseRenderscript NO-SOURCE

> Task :unityLibrary:generateReleaseBuildConfig

> Task :unityLibrary:generateReleaseResValues

> Task :unityLibrary:generateReleaseResources

> Task :unityLibrary:packageReleaseResources

> Task :launcher:preReleaseBuild

> Task :launcher:compileReleaseAidl NO-SOURCE

> Task :launcher:compileReleaseRenderscript NO-SOURCE

> Task :launcher:checkReleaseManifest

> Task :launcher:generateReleaseBuildConfig

> Task :launcher:generateReleaseSources

> Task :unityLibrary:generateReleaseRFile

> Task :unityLibrary:prepareLintJar UP-TO-DATE

> Task :launcher:mainApkListPersistenceRelease

> Task :unityLibrary:generateReleaseSources

> Task :launcher:generateReleaseResValues

> Task :launcher:generateReleaseResources

> Task :unityLibrary:javaPreCompileRelease


> Task :unityLibrary:compileReleaseJavaWithJavac


> Task :unityLibrary:bundleLibCompileRelease

> Task :unityLibrary:prepareLintJarForPublish UP-TO-DATE

> Task :unityLibrary:mergeReleaseShaders

> Task :unityLibrary:compileReleaseShaders

> Task :unityLibrary:generateReleaseAssets

> Task :unityLibrary:packageReleaseAssets

> Task :unityLibrary:bundleLibRuntimeRelease

> Task :unityLibrary:processReleaseJavaRes NO-SOURCE

> Task :unityLibrary:bundleLibResRelease

> Task :unityLibrary:mergeReleaseJniLibFolders

> Task :launcher:mergeReleaseResources

> Task :launcher:javaPreCompileRelease

> Task :launcher:createReleaseCompatibleScreenManifests


> Task :launcher:processReleaseManifest FAILED


See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.



> Task :unityLibrary:transformNativeLibsWithMergeJniLibsForRelease


Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.

Use '--warning-mode all' to show the individual deprecation warnings.

See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings

28 actionable tasks: 25 executed, 3 up-to-date

]

exit code: 1

UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <a83396a2554740a886f5ffb57e40eb15>:0)

Rethrow as GradleInvokationException: Gradle build failed

UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <a83396a2554740a886f5ffb57e40eb15>:0)

Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.

UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (UnityEditor.BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <a83396a2554740a886f5ffb57e40eb15>:0)

UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <fdb4e7a229ae4ef791f6716e71e93744>:0)

UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)



_

image

Build completed with a result of 'Failed' in 108 seconds (108199 ms)

UnityEngine.GUIUtility:ProcessEvent (int,intptr)



_

image

UnityEditor.BuildPlayerWindow+BuildMethodException: 4 errors

  at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x002bf] in <fdb4e7a229ae4ef791f6716e71e93744>:0

  at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x00080] in <fdb4e7a229ae4ef791f6716e71e93744>:0 

UnityEngine.GUIUtility:ProcessEvent (int,intptr)



_


I use Unity 2019.4.30f1

"bperrote" is my user on the PC

"D:\0_test\New Test Wikitude Android" is the path of the project


Hi Bastien,

I would recommend using the supported Unity Editor (or newer) stated in the documentation when using the latest SDK version.


If version 2019.4 must be used, this forum post could help with the gradle manifest merge issue.


Kind regards,

Gökhan

I am grateful that I read this. It is extremely useful and informative, and I learned a great deal from it.uno online   

Login or Signup to post a comment