Rana Yehya
Lurker
Hello, all!
I have built some applications on unity and without any problems and now I am trying to build mapbox example (Traffic and Direction) as an android application but I am getting this error
I checked the number minSdkVersion in the file specified and it is equal to 24
and tried to edit it and rebuild the scene but the same error pops again
and I uninstall Android SDK and install it again, but the build fails again
Here is the commands in console
Any help will be appreciated
I have built some applications on unity and without any problems and now I am trying to build mapbox example (Traffic and Direction) as an android application but I am getting this error
I checked the number minSdkVersion in the file specified and it is equal to 24
and tried to edit it and rebuild the scene but the same error pops again
and I uninstall Android SDK and install it again, but the build fails again
Here is the commands in console
Code:
CommandInvokationFailure: Gradle build failed.
C:/Program Files/Java/jdk1.8.0_211\bin\java.exe -classpath "C:\Program Files\Unity\Hub\Editor\2018.4.9f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
D:\grad\androidapp\Temp\gradleOut\src\main\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 24 declared in library [:com.mapbox.android.unity-debug:] C:\Users\USER\.gradle\caches\transforms-2\files-2.1\94a1c2f736d85c0b5b621cc7908de2dd\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 24,
or use tools:eek:verrideLibrary="com.mapbox.android.unity" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 24 declared in library [:com.mapbox.android.unity-debug:] C:\Users\USER\.gradle\caches\transforms-2\files-2.1\94a1c2f736d85c0b5b621cc7908de2dd\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 24,
or use tools:eek:verrideLibrary="com.mapbox.android.unity" to force usage (may lead to runtime failures)
* 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 [URL='https://help.gradle.org/']https://help.gradle.org[/URL]
BUILD FAILED in 2m 44s
]
stdout[
> Task :preBuild UP-TO-DATE
> Task :preReleaseBuild
> Task :compileReleaseAidl NO-SOURCE
> Task :compileReleaseRenderscript NO-SOURCE
> Task :checkReleaseManifest UP-TO-DATE
> Task :generateReleaseBuildConfig UP-TO-DATE
> Task :prepareLintJar UP-TO-DATE
> Task :generateReleaseSources UP-TO-DATE
> Task :javaPreCompileRelease
> Task :mainApkListPersistenceRelease UP-TO-DATE
> Task :generateReleaseResValues UP-TO-DATE
> Task :generateReleaseResources UP-TO-DATE
> Task :mergeReleaseResources
> Task :createReleaseCompatibleScreenManifests UP-TO-DATE
> Task :processReleaseManifest FAILED
See [URL]http://g.co/androidstudio/manifest-merger[/URL] for more information about the manifest merger.
10 actionable tasks: 4 executed, 6 up-to-date
]
exit code: 1
UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df45ca7b334d4b918976307f9d26db2e>:0)
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df45ca7b334d4b918976307f9d26db2e>:0)
UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df45ca7b334d4b918976307f9d26db2e>:0)
UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <df45ca7b334d4b918976307f9d26db2e>:0)
UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <df45ca7b334d4b918976307f9d26db2e>: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 <df45ca7b334d4b918976307f9d26db2e>:0)
UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <df45ca7b334d4b918976307f9d26db2e>:0)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <df45ca7b334d4b918976307f9d26db2e>:0)
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
Any help will be appreciated
Last edited by a moderator: