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 Exporting licenses - Android Studio Project Site
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?

If you run “C:\NVPACK\android-sdk-windows ools\bin\sdkmanager.bat --licenses” from the command line, you’ll be able to accept the licenses.

Another fix I found was to run Android.bat from “NVPACK\android-sdk-windows ools”. 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.

Thanks but that didn’t work for me. Instead I got the error message: “Error: Unknown argument --licenses”

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.

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 ools 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

[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

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

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

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!

thankyou bro for its working i like it

Had the same problem. Did all these things and still was having the same problem.
Now this is a total overlook apparently, but I did it.
This is another option to look for if you are still having the same problem.
Go to the Android ue4 quick start guide. Link below.

Go to part two, Project Setup. They have the button highlighted that I did not push before doing all the rest of this stuff. Stupid or not, I missed this but still putting it out there for other to use secretly in case this is what is stopping them also. lol

This worked for me! Thank you

Thanks, this worked for me. :smiley:

problem fixed here : How To Fix Unable to read package in Unreal Engine - YouTube

No. It’s not fixed this way.