1. Download our Official Android App: Forums for Android!

Build failure for mapbox example in unity

Discussion in 'Android Development' started by Rana Yehya, Dec 4, 2019 at 11:14 AM.

  1. Rana Yehya

    Rana Yehya Lurker
    Thread Starter
    Rank:
    None
    Points:
    5
    Posts:
    1
    Joined:
    Wednesday

    Wednesday
    1
    0
    5
    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
    [​IMG]
    I checked the number minSdkVersion in the file specified and it is equal to 24
    [​IMG]
    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 (Text):
    1.  
    2. CommandInvokationFailure: Gradle build failed.
    3. 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"
    4.  
    5. stderr[
    6. D:\grad\androidapp\Temp\gradleOut\src\main\AndroidManifest.xml Error:
    7. 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
    8. Suggestion: use a compatible library with a minSdk of at most 16,
    9. or increase this project's minSdk version to at least 24,
    10. or use tools:eek:verrideLibrary="com.mapbox.android.unity" to force usage (may lead to runtime failures)
    11.  
    12. FAILURE: Build failed with an exception.
    13.  
    14. * What went wrong:
    15. Execution failed for task ':processReleaseManifest'.
    16. > 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
    17. Suggestion: use a compatible library with a minSdk of at most 16,
    18. or increase this project's minSdk version to at least 24,
    19. or use tools:eek:verrideLibrary="com.mapbox.android.unity" to force usage (may lead to runtime failures)
    20.  
    21. * Try:
    22. 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.
    23.  
    24. * Get more help at [URL='https://help.gradle.org/']https://help.gradle.org[/URL]
    25.  
    26. BUILD FAILED in 2m 44s
    27. ]
    28. stdout[
    29. > Task :preBuild UP-TO-DATE
    30. > Task :preReleaseBuild
    31. > Task :compileReleaseAidl NO-SOURCE
    32. > Task :compileReleaseRenderscript NO-SOURCE
    33. > Task :checkReleaseManifest UP-TO-DATE
    34. > Task :generateReleaseBuildConfig UP-TO-DATE
    35. > Task :prepareLintJar UP-TO-DATE
    36. > Task :generateReleaseSources UP-TO-DATE
    37. > Task :javaPreCompileRelease
    38. > Task :mainApkListPersistenceRelease UP-TO-DATE
    39. > Task :generateReleaseResValues UP-TO-DATE
    40. > Task :generateReleaseResources UP-TO-DATE
    41. > Task :mergeReleaseResources
    42. > Task :createReleaseCompatibleScreenManifests UP-TO-DATE
    43.  
    44. > Task :processReleaseManifest FAILED
    45.  
    46. See [URL]http://g.co/androidstudio/manifest-merger[/URL] for more information about the manifest merger.
    47.  
    48. 10 actionable tasks: 4 executed, 6 up-to-date
    49. ]
    50. exit code: 1
    51. UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df45ca7b334d4b918976307f9d26db2e>:0)
    52. UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df45ca7b334d4b918976307f9d26db2e>:0)
    53. UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) (at <df45ca7b334d4b918976307f9d26db2e>:0)
    54. UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) (at <df45ca7b334d4b918976307f9d26db2e>:0)
    55. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <df45ca7b334d4b918976307f9d26db2e>:0)
    56. Rethrow as GradleInvokationException: Gradle build failed
    57. UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) (at <df45ca7b334d4b918976307f9d26db2e>:0)
    58. UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <df45ca7b334d4b918976307f9d26db2e>:0)
    59. UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) (at <df45ca7b334d4b918976307f9d26db2e>:0)
    60. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    61.  
    62. UnityEditor.BuildPlayerWindow+BuildMethodException: 2 errors
    63. at UnityEditor.BuildPlayerWindow+DefaultBuildMethods.BuildPlayer (UnityEditor.BuildPlayerOptions options) [0x00242] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:194
    64. at UnityEditor.BuildPlayerWindow.CallBuildMethods (System.Boolean askForBuildLocation, UnityEditor.BuildOptions defaultBuildOptions) [0x0007f] in C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97
    65. UnityEngine.GUIUtility:processEvent(Int32, IntPtr)
    66.  
    Any help will be appreciated
     

    Advertisement

    #1 Rana Yehya, Dec 4, 2019 at 11:14 AM
    Last edited by a moderator: Dec 4, 2019 at 1:24 PM
  2. Unforgiven

    Unforgiven ...eschew obfuscation...
    Moderator
    Rank:
     #2
    Points:
    4,488
    Posts:
    38,386
    Joined:
    Jun 23, 2010

    Jun 23, 2010
    38,386
    47,729
    4,488
    Male
    Douglas, MA
    I moved this to the development area for better answers. :)
     
  3. codesplice

    codesplice Elite Recognized Moderator
    Moderator
    Rank:
     #14
    Points:
    1,638
    Posts:
    9,131
    Joined:
    Oct 29, 2013

    Oct 29, 2013
    9,131
    10,791
    1,638
    Male
    SysAdmin
    Huntsville, AL
    And I wrapped the command output in [code]...[/code] tags to make it a bit more legible... but I'm afraid that's about all the assistance I can offer on this subject :D
     
    Unforgiven likes this.

Share This Page

Loading...