Announcement

Collapse
No announcement yet.

License for Android build tools not accepted?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    License for Android build tools not accepted?

    Hello,

    I was testing deployment for a game to an android phone. While it was packing, I got this error;

    LogPlayLevel: Checking the license for package Android SDK Build-Tools 26.0.2 in C:\NVPACK\android-sdk-windows\licenses
    LogPlayLevel: Warning: Warning: License for package Android SDK Build-Tools 26.0.2 not accepted.
    LogPlayLevel: FAILURE: Build failed with an exception.
    LogPlayLevel: * What went wrong:
    LogPlayLevel: A problem occurred configuring project ':app'.
    LogPlayLevel: > You have not accepted the license agreements of the following SDK components:
    LogPlayLevel: [Android SDK Build-Tools 26.0.2].
    LogPlayLevel: Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
    LogPlayLevel: Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
    LogPlayLevel: * Try:
    LogPlayLevel: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    LogPlayLevel: * Get more help at https://help.gradle.org
    LogPlayLevel: BUILD FAILED in 19s
    LogPlayLevel: Error: ERROR: cmd.exe failed with args /c "C:\Users\armaa\OneDrive\Documents\Unreal Projects\VRTest\Intermediate/Android/APK\gradle\rungradle.bat" :app:assembleDebug
    LogPlayLevel: (see C:\Users\armaa\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+(x86)+UE_4.21\Log.txt for full exception trace)
    LogPlayLevel: AutomationTool exiting with ExitCode=1 (Error_Unknown)
    LogPlayLevel: Completed Launch On Stage: Deploy Task, Time: 28.787234
    LogPlayLevel: BUILD FAILED
    PackagingResults: Error: Launch failed! Unknown Error

    I'm unsure of how to accept the agreement. Is there something I'm missing here?

    #2
    If you run "C:\NVPACK\android-sdk-windows\tools\bin\sdkmanager.bat --licenses" from the command line, you'll be able to accept the licenses.

    Comment


      #3
      Another fix I found was to run Android.bat from "NVPACK\android-sdk-windows\tools". This will let you select the option 26.0.2. I'm not sure if the update of the Engine has somehow forced the build process to use 26.0.2 instead of 26.0.1, as I found I already had 26.0.1 installed.

      Comment


        #4
        Originally posted by kiddinge View Post
        If you run "C:\NVPACK\android-sdk-windows\tools\bin\sdkmanager.bat --licenses" from the command line, you'll be able to accept the licenses.
        Thanks but that didn't work for me. Instead I got the error message: "Error: Unknown argument --licenses"

        Comment


          #5
          Hey! I've since fixed the issue. I went into NVPack and deleted the license itself, and then reaccepted it in the UE4 engine. Fixed the issue on my end, hope it works for you guys as well.

          Comment


            #6
            Hey folks!

            The issue seems to be somewhat misleading, it was occurring for me as well with Unreal Engine 4.21.2. The CodeWorksforAndroid-1R7u1 included with said Engine installs
            Android SDK Build-Tools 26.0.1 by default. This leads to you receiving the error message "License for package Android SDK Build-Tools 26.0.2 not accepted." as it's likely not
            even installed.

            To install the 26.0.2 simply navigate to android-sdk-windows\tools and execute the android.bat to access the list of tools. Under tools you should find the version 26.0.2, install
            it and you're done!

            Comment


              #7
              Originally posted by IronKintra View Post
              Hey folks!

              The issue seems to be somewhat misleading, it was occurring for me as well with Unreal Engine 4.21.2. The CodeWorksforAndroid-1R7u1 included with said Engine installs
              Android SDK Build-Tools 26.0.1 by default. This leads to you receiving the error message "License for package Android SDK Build-Tools 26.0.2 not accepted." as it's likely not
              even installed.

              To install the 26.0.2 simply navigate to android-sdk-windows\tools and execute the android.bat to access the list of tools. Under tools you should find the version 26.0.2, install
              it and you're done!
              /thanks!! You are awesome

              Comment


                #8
                [QUOTE = "Dune; n1579175"] Otra solución que encontré fue ejecutar Android.bat desde "NVPACK \ android-sdk-windows \ tools". Esto le permitirá seleccionar la opción 26.0.2. No estoy seguro de si la actualización del Motor ha forzado de alguna manera el proceso de compilación para usar 26.0.2 en lugar de 26.0.1, ya que encontré que ya tenía 26.0.1 instalado. [/ QUOTE]


                Thank you very much, it worked perfectly

                Comment


                  #9
                  I came across this and I found a solution that doesn't require you to install any more build tools versions (none of that worked for me):

                  This has been fixed in 4.22, but the workaround for 4.21 is rather simple:

                  1. Download 4.22 (preview or release doesn't matter in case you're reading this after 4.22 release).
                  2. Find package.xml at \UE_4.22\Engine\Source\ThirdParty\Android
                  3. Replace package.xml at \UE_4.21\Engine\Source\ThirdParty\Android
                  4. You should now be able to "Accept SDK license" again in Project settings -> Android

                  Comment


                    #10
                    Thanks, I am new to this and this was an issue i was having for several hours.

                    Comment


                      #11
                      Originally posted by VictorLerp View Post
                      I came across this and I found a solution that doesn't require you to install any more build tools versions (none of that worked for me):

                      This has been fixed in 4.22, but the workaround for 4.21 is rather simple:

                      1. Download 4.22 (preview or release doesn't matter in case you're reading this after 4.22 release).
                      2. Find package.xml at \UE_4.22\Engine\Source\ThirdParty\Android
                      3. Replace package.xml at \UE_4.21\Engine\Source\ThirdParty\Android
                      4. You should now be able to "Accept SDK license" again in Project settings -> Android
                      Great find VictorLerp. Nice and easy. Glad to hear this is fixed for 4.22.

                      (Also, nice to bump into you on the forums, and thanks for the tip off about Oculus:Quest at the UE4 Dev Meetup last night.)

                      Comment


                        #12
                        Originally posted by DesertEagle_PWN View Post

                        Great find VictorLerp. Nice and easy. Glad to hear this is fixed for 4.22.

                        (Also, nice to bump into you on the forums, and thanks for the tip off about Oculus:Quest at the UE4 Dev Meetup last night.)
                        No worries!

                        It's a great step towards VR adoption, let's make all the things when it gets released!

                        Comment


                          #13
                          Originally posted by IronKintra View Post
                          Hey folks!

                          The issue seems to be somewhat misleading, it was occurring for me as well with Unreal Engine 4.21.2. The CodeWorksforAndroid-1R7u1 included with said Engine installs
                          Android SDK Build-Tools 26.0.1 by default. This leads to you receiving the error message "License for package Android SDK Build-Tools 26.0.2 not accepted." as it's likely not
                          even installed.

                          To install the 26.0.2 simply navigate to android-sdk-windows\tools and execute the android.bat to access the list of tools. Under tools you should find the version 26.0.2, install
                          it and you're done!

                          thankyou bro for its working i like it

                          Comment

                          Working...
                          X