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

              Working...
              X