Automatically accept all SDK licences
Asked Answered
R

65

608

Since gradle android plugins 2.2-alpha4:

Gradle will attempt to download missing SDK packages that a project depends on

Which is amazingly cool and was know to be a JakeWharton project.

But, to download the SDK library you need to: accept the license agreements or gradle tells you:

You have not accepted the license agreements of the following SDK components: [Android SDK Build-Tools 24, Android SDK Platform 24]. 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. 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

And this is a problem because I would love to install all sdk dependencies while doing a gradle build.

I am looking for a solution to automatically accept all licenses. Maybe a gradle script ? Do you have any ideas ?

Retrochoir answered 29/6, 2016 at 9:56 Comment(15)
You can also pop an echo y | in front of that command to auto accept the licence. Useful when running on a headless CI box :)Schulman
I had to do ~/.android/tools/android update sdk --no-ui --filter build-tools-25.0.0,android-25,extra-android-m2repository because the android tool was localized to my homeSymphonious
sdkmanager --licenses no longer works. I used --upgrade, ignored the errors and this sorted the license problems.Ody
sdkmanager --licenses in Android\tools\bin folder worked for me!Robin
I've used this command for CI environment build script with small adjustment. I've added --sdk_root=$ANDROID_SDK_PATH. Problem was that licenses were accepted and not saved to Android SDK root folder. Final command: yes | sdkmanager --licenses --sdk_root=$ANDROID_SDK_PATH (without sudo)Euphemie
Be sure to have set $ANDROID_SDK_PATH to the actual root path where you've installed the SDK (i.e.: /opt/android-sdk), or just put the path directly (i.e.: yes | sdkmanager --licenses --sdk_root=/opt/android-sdk)Boots
yes | sudo sdkmanager --licenses this throws an Error: Unknown argument --licenses @RetrochoirConstantino
In ubuntu docker, this worked for me: RUN sh -c ' printf "y\ny\ny\ny\ny\ny\ny\ny\ny\ny\n" | ./sdkmanager --licensesUpon
@Boots that comment is quite important actually, if you work through cmd it's very likely you set ANDROID_HOME, so it doesn't work whatever else you doMerovingian
I haven't seen "sdkmanager --licenses" work on any SDK since ~2017 - FYI Use "sdkmanager --update" insteadTulatulip
I get ye sno se reconoce como comando internoMoskowitz
Where do you run yes | sdkmanager --licenses --sdk_root=$ANDROID_SDK_PATH because yes is not a command.Moskowitz
for window open cmd and change dir to C:\Users\username\AppData\Local\Android\Sdk\tools\bin and execute " sdkmanager --licenses"Anthropogeography
errors when executing sdkmanager --licenses with Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema at com.android.repository.api.SchemaModule$SchemaModuleVersion.<init>(SchemaModule.java:156)Blasted
Note for Linux users, in my case there was a permission issue, so I used sudo, only to realize that after accepting the licenses, they still showed as not accepted under user. To solve this, precede the sdkmanager --licenses with sudo chmod a+w $ANDROID_HOME/licensesCephalometer
R
548

UPDATE 2021 This should be the accepted answer as its easy and upto date


AndroidSDK can finally accept licenses.

Go to Android\sdk\tools\bin

yes | sdkmanager --licenses

EDIT:

as pointed out in the comments by @MoOx, on macOS, you can do

yes | sudo ~/Library/Android/sdk/tools/bin/sdkmanager --licenses

as pointed out in the comments by @pho, @mikebridge and @ Noitidart on Windows, you can do

cmd.exe /C"%ANDROID_HOME%\tools\bin\sdkmanager.bat --licenses"

be sure to install java before

Retrochoir answered 29/6, 2016 at 9:56 Comment(26)
On Widows I had to go to Run then C:\Users\x1\AppData\Local\Android\sdk\tools\android then it popped open a GUI and then install missing then click "Accept Liscenses" in new dialog that pops.Decortication
This is not working for linux. There is no sdkmanager file under the tools/bin dir or somewhere else. Can you please help?Tacet
On macOS, you can do yes | sudo ~/Library/Android/sdk/tools/bin/sdkmanager --licensesLooney
How can I accept licenses automatically from gradle wrapper?Schuss
On mac via CLI on the path /Library/Android/sdk/tools/bin, execute: yes | ./sdkmanager --licensesCurtal
If automating this process (maybe using Travis?), you need to update sdkmanager first by running: sdkmanager --updateMollymollycoddle
Finally, as of which version was this feature introduced?Janot
This worked great in my Dockerfile where I had to accept all licenses during installation of certain packages in SDK manager: RUN yes | sdkmanager "build-tools;28.0.2" "platform-tools"Neutralism
upvote to @Decortication for the path, but it didn't work, I had to run C:\Users\x1\AppData\Local\Android\sdk\tools\bin\sdkmanager --licenses from the command prompt and hit "y" + Enter to the promptsMetalinguistic
Thanks @gangt for upvote and sharing the better path!Decortication
Where do I find sdkmanager? It's not in my bin folder for the "Android Studio and SDK tools" that I downloaded.Intelligentsia
Mine is at C:\Users\UserName\sdk-tools-windows-4333796 \tools\bin\sdkmanager.bat.Incredulity
I have to change the location to { yes | sudo /opt/android/tools/bin/sdkmanager --licenses }Antiphon
on windows, if you happen to have GitBash installed. you can run yes | C:\Users\x1\AppData\Local\Android\sdk\tools\bin\sdkmanager.bat --licenses thereFreeswimming
I had issues with this and couldn't run the sdkmanager, if you have an issue with it complaining about some Java.xml file, be sure you're using Java8 as I had Java11 set as my global versionPiccoloist
None of the command line stuff worked for me on Windows, but going to Tools -> SDK and downloading another SDK prompts you to accept licenses.Filum
Good god android development is garbage. I started out a couple of years ago using one of their template examples, and every time I go back to it, there's a new version of android studio, and it takes hours to get that project - which was working fine - working again...Camelopardus
"sdkmanager --licenses" hasn't worked in years and people still post it as a solution and people still upvote it. What am I missing? Y'all using old AF AndroidSDKs?Tulatulip
One license was nicely accepted by command echo y| "%ANDROID_SDK_PATH%\tools\bin\sdkmanager" "ndk-bundle" on Windows. It must be without space between y and |Ivoryivorywhite
On Mac while running the above command if you face issue like "zsh command not found sdkmanager Mac" it means you have not installed JDK. So please first install JDK and then run the above command. All licences will be accepted. Now you can proceed with your work like again run the project and you won't get any issue.Scopula
--licences is not part of the SDK any longer!Curran
I needed to follow this link before: #53995424Addieaddiego
I needed to add sudo prefix, then it worked. Otherwise it said "licenses accepted" but when I checked again they were not actually accepted. With sudo it became permanent.Advantage
This actually doesn't work, because you're not downloading sdk's, so you still get halted.Skiver
Lubuntu : I had to apt install sdkmanager and then type "sudo sdkmanager --licenses" TWICE (saying "y" the first time).Actuality
Have a look at this page : #55829425Actuality
S
299

I was getting this error:

License for package Android SDK Build-Tools 30.0.2 not accepted.

So, I went to Tools -> SDK Manager -> SDK Tools. Then I installed Google Play Licensing Library. It solved the problem.

enter image description here

Smaragdine answered 19/12, 2020 at 16:49 Comment(9)
I'm afraid I'm going to have to disagree with @AminPinjari and Cedric, this didn't make a darn bit of difference for me.Verner
You dont have to reinstall everything - it is sufficient to run android-sdk/tools/bin/sdkmanager --licensesHeterogenesis
Thank you, it is working on Windows with Android Studio Arctic Fox 2020.3.1 on 2021-08-02Jota
I don't understand why this is needed with a fresh install of AS but I'm happy that this answer exists! I just installed this and then did a gradle sync and all was great.Cohen
I found and used this solution for my issues while I was using a Windows PC. I shifted to Mac, found the same problem and the same solution fixed my issue yet again. This is the best answer as of 2021.Hydrops
This worked easily. But all the same building software is getting complicated.Ace
It's nice that it works, but why???? why does it work? why is it needed?Taper
And what is the equivalent on the command line?Peirsen
can someone point out how can we do it using command line (debian)?Diorite
S
185

I have encountered this with the alpha5 preview.

Jake Wharton pointed out to me that you can currently use

mkdir -p "$ANDROID_SDK/licenses"
echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_SDK/licenses/android-sdk-license"
echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_SDK/licenses/android-sdk-preview-license"

to recreate the current $ANDROID_HOME/license folder on you machine. This would have the same result as the process outlined in the link of the error msg (http://tools.android.com/tech-docs/new-build-system/license).

The hashes are sha1s of the licence text, which I imagine will be periodically updated, so this code will only work for so long :)

And install it manually, but it is the gradle's new feature purpose to do it.

I was surprised at first that this didnt work out of the box, even when I had accepted the licenses for the named components via the android tool, but it was pointed out to me its the SDK manager inside AS that creates the /licenses folder.

I guess that official tools would not want to skip this step for legal reasons.

Rereading the release notes it states

SDK auto-download: Gradle will attempt to download missing SDK packages that a project depends on.

Which does not mean it will work if you have not installed the android tools yet and have already accepted the latest license(s).

EDIT: Saying that, it still does not work on my test gubuntu box until I link the SDK up to AS. CI works fine though - not sure what the difference is...

Schulman answered 14/7, 2016 at 18:26 Comment(12)
There is a small glitch in sdkDownload feature regarding some of the components, e.g., support-v4. It will update the components but gradle won't see update until next invocation. One workaround to exec gradle twice, once to throw away: gradle dependencies || true -- code.google.com/p/android/issues/detail?id=212309Sandeesandeep
you can use mkdir -p instead of || true.Currish
It works thank you for this glitch, good to know. To check if your SDK path is defined as expected : echo $ANDROID_SDKWren
In my environment ANDROID_SDK is not defined, but it works with ANDROID_HOMEWhitman
This fails for Android SDk 26.Lepage
Looks like another UID is needed for platform and build-tools: d56f5187479451eabf01fb78af6dfcb131a6481e. 8933bad161af4178b1185d1a37fbf41ea5269c55 still works for Google Repository and Android Support Repository.Boggers
@Paul, Can you please add a code snippet which adds the new key. For me, the build is failing at the line "Downloading services.gradle.org/distributions/gradle-2.14.1-all.zip"Enterogastrone
@stack_ved: I've just added another echo: echo -e "\nd56f5187479451eabf01fb78af6dfcb131a6481e" >> "${ANDROID_HOME}/licenses/android-sdk-license". But I think your problem hides somewhere else.Boggers
true, the problem is with the new way of installing dependencies may be. SOmehtin like the accepted answer. Or what @Retrochoir has mentioned above. Any idea?Enterogastrone
Turned out for me what @Boggers is suggesting worked. But i am looking forward to fix it for good. Thanks Paul!Enterogastrone
any option to prevent gradle android plugin from automatic download of missing components?Igbo
if you want to get this sha n8933bad161af4178b1185d1a37fbf41ea5269c55 you should run in your terminal sdkmanager --licenses at the bin folder of the path of your sdk , then accept it , then open the license file you acceptedFcc
D
147

For the newest Android Studio (2.3) the best way to update/accept all licenses is to run:

cd $ANDROID_HOME
tools/bin/sdkmanager --licenses

you might still need to copy the licence files to other locations based on your setup.

Dioptrics answered 27/3, 2017 at 6:53 Comment(8)
This looks like the best way to go and it works on all platforms too, just run tools/bin/sdkmanager --licensesDeadlight
If you got old sdk manager --licenses wont work. It is necessary to copy tools folder to another location then use --sdk_root= and point it to your sdk folder, then you would be able to update tools to newer version.Wells
can we pipe yes into this command somehow for automated build systems? You won't always have interactive console access to these machines, so pressing y on keyboard physically won't work.Neutralism
Can anyone please guide me how to implement this solution? Got to add this line in build.sh?Enterogastrone
it worked for me but i had to do cd $ANDROID_HOME before executing this commandOgrady
Worked for me, but maybe you should add cd $ANDROID_HOME just to be more clear where to execute this, anyways thanks a lot.Cotterell
I have android studion 3.0.1 I have updated all the sdk tools but I still see license error, I do try to run the command but I got this error: -bash: tools/bin/sdkmanager: No such file or directoryPolymerism
Not a valid answer to the question. This still needs manual input and thus it is not automatic as asked.Chemotropism
S
61

For the new sdkmanager utility:

yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;24.0.3"

There's a bit of a delay between yesses, so the command could hang with the license showing for a while, but it doesn't require human intervention.

Scraper answered 8/2, 2017 at 23:45 Comment(5)
In my install debian9 I only have a sdkmanager.jar: android-sdk-linux/tools/lib/sdkmanager.jar and # java -jar /android-sdk-linux/tools/lib/sdkmanager.jar Error: The tools directory property is not set, please make sure you are executing androidTaxexempt
This is based on the assumption that you downloaded the SDK tools as an archive from Google and unpacked them into $ANDROID_HOMEScraper
This seems the most up-to-date answer. It seems --licenses does not exist anymore. Note: to see list of possible versions that can be provided: $ANDROID_HOME/tools/bin/sdkmanager --listChatav
Thanks for the hint. I ended up using yes | android-sdk-linux/tools/bin/sdkmanager --licenses || true in my CI.Areopagus
es | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;28.0.3" -> changing the version worked for me . Thanks !Antiphon
S
46

If you are using Jenkins, you can use the following bash script as first step in the build process:

(while sleep 3; do echo "y"; done) | $ANDROID_HOME/tools/android update sdk -u

This will of course install ALL available updates, but it will save you some time if you can spare the disk space. The sleep is to avoid the broken readline in the installation program, since "yes" does not work properly in this case.

EDIT: You also need to add the "Install Android project prerequisites" plugin in the build step to get the correct $ANDROID_HOME if you are using the built-in SDK manager.

Seville answered 29/12, 2016 at 10:43 Comment(4)
I add your line of code before "cordova platform add android" in my jenkins build which is running on Ubuntu but still getting following error : BUILD FAILED in 7s Error: /var/lib/jenkins/workspace/qa_global_php/platforms/android/gradlew: Command failed with exit code 1 Error output: FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring root project 'android'. > You have not accepted the license agreements of the following SDK components:Sevigny
[Android SDK Build-Tools 26.0.2]. 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.Sevigny
"The sleep is to avoid the broken readline in the installation program" <- What does that mean?Docia
That android tool is deprecatedSkiver
C
36

We found same issue building the project on Jenkins. With buildToolsVersion '25.0.2', we must accept licenses before building. In our case, we needed to run:

yes | sdkmanager --update that accepts licenses for the sdkmanager itself, and then

yes | sdkmanager --licenses that accepts new licenses not previously accepted

Remember: run these commans with the same user that jenkins does. In our Debian, the Jenkins user is just jenkins. In other words: doing it as root will create the accepted licenses as root, so Jenkins will not be able to read them.

By the way, we found sdkmanager at /var/lib/jenkins/tools/android-sdk/tools/bin. If yours is not there, find it with find / -name "sdkmanager"

Cult answered 20/3, 2017 at 10:1 Comment(4)
this one solved the issue in my case too (build tools 26.0.x), with Jenkins in Docker. Thanks!Southbound
Unfortunately this does not include the "automatically" part of the question.Chemotropism
@Chemotropism thanks for your comment! I've updated the question to match with last version feature to automatically accept all licenses without human intervention.Cult
@Maruf install the Android SDK and add it to the path :·)Cult
P
36

this solved my error

echo yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2"
Pray answered 14/8, 2017 at 7:37 Comment(1)
To save a few characters, yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2" does the same thing.Platitudinous
P
32

Unfortunately the way as OP originally solved it does not always work. If you find from the error message what is your builds current build-tools version. It could be that it is a higher version of build-tools that is missing. In that case you need to manually start SDK Manager and add the build-tools and accept license.

Per OP instructions, it look as follows.

$ ./gradlew build

 
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/2.14.1/userguide/gradle_daemon.html.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> You have not accepted the license agreements of the following SDK components:
  [Android SDK Build-Tools 24.0.2].

...
BUILD FAILED

NOTE: 2017-04-16

The android tool has now been deprecated in favor of the new sdkmanager. Please see Joe Lawson's answer and subsequent posts from March (2017) and onward.

Then adjust you command as follows:

android update sdk --no-ui --filter build-tools-24.0.2,android-24,extra-android-m2repository
Refresh Sources:
  Fetching https://dl.google.com/android/repository/addons_list-2.xml
  Validate XML
  Parse XML
  Fetched Add-ons List successfully
  Refresh Sources
  Fetching URL: https://dl.google.com/android/repository/repository-11.xml
  Validate XML: https://dl.google.com/android/repository/repository-11.xml
  Parse XML:    https://dl.google.com/android/repository/repository-11.xml
...
Error: Ignoring unknown package filter 'build-tools-24.0.2'
-------------------------------
License id: android-sdk-license-xxxxxxxx
Used by: 
 - SDK Platform Android 7.0, API 24, revision 2
  - Android Support Repository, revision 39
-------------------------------

...

November 20, 2015
Do you accept the license 'android-sdk-license-xxxxxxxx' [y/n]: y

Installing Archives:
  Preparing to install archives
  Downloading SDK Platform Android 7.0, API 24, revision 2
  Installing SDK Platform Android 7.0, API 24, revision 2
    Installed SDK Platform Android 7.0, API 24, revision 296%)
  Downloading Android Support Repository, revision 39
  Installing Android Support Repository, revision 39
    Installed Android Support Repository, revision 3999%)
  Done. 2 packages installed.

Running this again, still do not make Gradle happy. So manual acceptance is the only solution until someone come up with something better. (Please do!)

Precise answered 2/11, 2016 at 15:12 Comment(1)
android update sdk --no-ui --filter build-tools-24.0.2,android-24,extra-android-m2repository running this via command prompt with admin right fixed the error. I was unable to install phonegap plugin managerParnassian
C
24

The android tool is deprecated and you should use the sdkmanager instead. sdkmanager also writes the licenses file when you first accept it. The license changes depending on which SDK you are using so even though the command

echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_SDK/licenses/android-sdk-license"

works on some systems. It won't work on all. Some SDK installs expect to license file to end without a newline in the file so try adding a -n to the echo command.

echo -n -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_SDK/licenses/android-sdk-license"

If that isn't working you can try using the base64 encoding instead.

So to discover my license:

$> rm ${ANDROID_HOME}/
$> unzip tools_r25.2.3-linux.zip -d ${ANDROID_HOME}
$> ${ANDROID_HOME}/tools/bin/sdkmanager "system-images;android-23;default;x86_64"

It'll prompt you to accept the license. After accepting it'll copy it to ${ANDROID_HOME}/licenses/android-sdk-license. To ensure you always get exactly what is written use base64.

$> base64 ${ANDROID_HOME}/licenses/android-sdk-license
Cjg5MzNiYWQxNjFhZjQxNzhiMTE4NWQxYTM3ZmJmNDFlYTUyNjljNTU=

Then you can use base64 -d recreate the file exactly.

$> echo Cjg5MzNiYWQxNjFhZjQxNzhiMTE4NWQxYTM3ZmJmNDFlYTUyNjljNTU= | base64 -d > ${ANDROID_HOME}/licenses/android-sdk-license

You can verify if the file written is what is expected by running a sha1sum on it.

$> sha1sum ${ANDROID_HOME}/licenses/android-sdk-license
da6b80c9c47b41c0bf7032938e7137a58a3dc249
Cagle answered 2/2, 2017 at 18:35 Comment(0)
P
19

if you run yes | sdkmanager --licenses, then we print content of $ANDROID_HOME/licenses/android-sdk-license,

we will get this

# cat $ANDROID_HOME/licenses/android-sdk-license

8933bad161af4178b1185d1a37fbf41ea5269c55

d56f5187479451eabf01fb78af6dfcb131a6481e

For GitLab CI, to accept Android SDK Build-Tools 26.0.2 licenses, you need to run this

before_script:
  - mkdir -p $ANDROID_HOME/licenses
  - echo "8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_HOME/licenses/android-sdk-license
  - echo "d56f5187479451eabf01fb78af6dfcb131a6481e" >> $ANDROID_HOME/licenses/android-sdk-license
Plucky answered 11/10, 2017 at 10:49 Comment(9)
You're second echo is going to the same $ANDROID_HOME/licenses/android-sdk-license is this intended? ie. appendingBottom
@RyanR, yes, the second echo is appending, Android SDK Build-Tools 26.02 added a new license sha1 stringPlucky
I'm using bitbucket pipelines, but the concept seems to be the same as with GitLab CI. Your answer helped me understand the whole process better. Thanks!Ravel
@Ravel I'm also using Bitbucket Pipelines and found myself here when we upgraded to Build-Tools 26.0.2 and our build broke. My end solution was to simply do yes | sdkmanager --licenses. No echos needed and this is future proof.Bottom
@Ryan You mean I can just add 'yes | sdkmanager --licenses' to the pipeline.yml? That would be great!Ravel
Doesn't work for me. sdkmanager says unknown argument --licenses... perhaps a newer version would be required?Ravel
I'm using the latest android sdk dl.google.com/android/repository/sdk-tools-linux-3859397.zip. Here's my Dockerfile: git.io/vdS5kBottom
(Using SDK 27) since my CI is Windows-based, I did the following: copied and checked-in the whole %ANDROID_HOME%\licenses folder into the git repo as ./exported-licenses, and then in the build file I put as follows: xcopy exported-licenses %ANDROID_HOME%\licenses /s/h/e/k/f/c/y/iSevern
This worked for my non-production build, but production complains I haven't accepted all licenses. Is there something I'm missing?Heeled
W
17

Note that for anyone coming to this question currently, build-tools-24.0.2 is (I think) now considered obsolete, so you'll get:

 Error: Ignoring unknown package filter 'build-tools-24.0.2'

when running the various commands that have been suggested to install them.

The solution is to add --all:

android update sdk --no-ui --all --filter "build-tools-24.0.2"

Also if you're on 32bit linux, everything after build tools 23.0.1 is 64bit only, so will not run. 32bit users are stuck on 23.0.1, the only way to get a later build tools is to switch to 64bit.

Woodrow answered 22/11, 2016 at 8:19 Comment(2)
Yeah, build-tools was just bumped to 25.0.1.Precise
Your solution was the only thing I could find to work on a headless ubuntu 16 machine for build-tools-25 and gradle 4Undershorts
E
15

If you use tools/bin/sdkmanager --licenses you still need to have a human interaction. I have the problem using my gitlab CI. This is my solution:

wget --quiet --output-document=tools.zip https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip
unzip -qq tools.zip
echo y | tools/bin/sdkmanager "platforms;android-25"
echo y | tools/bin/sdkmanager "platform-tools"
echo y | tools/bin/sdkmanager "build-tools;25.0.2"
echo y | tools/bin/sdkmanager "extras;android;m2repository"
echo y | tools/bin/sdkmanager "extras;google;m2repository"

echo y will say yes if there is any question, but you need to make one line per installe package

Estrada answered 28/4, 2017 at 5:21 Comment(2)
Still quite relevant after several months. Thank you. You saved my day :)Gargantuan
This was helpful for me, also using GitLabSurfboarding
A
15

You can also just execute:

$ANDROID_HOME/tools/bin/sdkmanager --licenses

And in Windows, execute:

%ANDROID_HOME%/tools/bin/sdkmanager --licenses
Adcock answered 27/3, 2018 at 13:19 Comment(0)
R
14

Ok FOR ANYONE HAVING THIS ISSUE AS OF 2018. The above answers did NOT work for me at all. What DID work was opening Android SDK - clicking the DOWNLOAD button on the tool bar and selecting the appropriate packages. After they finish downloading, it will let you accept the license agreement.

enter image description here

Rightful answered 20/2, 2018 at 4:35 Comment(0)
B
12

In Android Studio for Windows, the solution is as follows:

Go to File -> Settings -> Appearance & Behaviour -> System Settings -> Android SDK -> SDK Tools -> check Google Play Licensing Library -> Click Apply, and then Ok

After the installation, build your application. It will work.

Bosomy answered 9/11, 2021 at 11:39 Comment(1)
It worked! Welcome to the community :-)Cassino
S
11

For an error message about SDK api number 25:

android update sdk --no-ui --all --filter build-tools-25.0.1,android-25,extra-android-m2repository

Squashy answered 1/2, 2017 at 11:21 Comment(0)
R
9

Note: This is only for Mac users

I had same issue but none of the answers posted helped since there was no tools folder present in Library/Android/sdk. (I'm using Android 3.6.3 on Mac OS 10.14.4)

error screenshot

Below steps helped me to overcome licensing problem error:

  1. Open Android Studio
  2. Press cmd + shift + A. This opens Actions pop-up window.
  3. Search for SDK Manager and hit enter to open.
  4. This opens pop-up for Android SDK. Select some other version of Android apart from already installed one. (In my case Android 10.0 was already installed so I selected Android 9.0)
  5. Then select Apply button. This will install corresponding SDK.

Solution

  1. Now run your app it should work without any exception.

success screenshot

Richardo answered 26/4, 2020 at 12:27 Comment(0)
D
8

For those having issues with the command line SDK, the reason it won't find the licenses you have accepted is because they have have been written to a different location than $ANDROID_HOME/licenses which is where they need to be.

I found the easiest solution was to accept the licenses like this:

$ANDROID_HOME/bin/sdkmanager --licenses --sdk_root=$ANDROID_HOME

Note: This assumes you've set ANDROID_HOME to point to wherever your sdk is installed.

Deckle answered 31/3, 2018 at 11:14 Comment(0)
A
7

I solved this problem by creating a public git repo with the accepted license files. Then I use wget to fetch these licenses on any machine I need into a [sdk-dir]/licenses directory before running ./gradlew to build my project.

Americanist answered 15/11, 2016 at 17:21 Comment(2)
Unfortunately, your solution doesn't tell me how to solve the problem. Can you share how you obtained the "license files"?Albemarle
@FrederickNord Licenses are obtained from your $ANDROID_HOME/sdk/licenses on your computer.Americanist
C
7

I went to Tools -> SDK Manager -> SDK Tools. Then I installed Google Play Licensing Library. It solved the problem.

Contrapuntal answered 11/10, 2021 at 5:31 Comment(2)
For MacOS, this worksShig
And for Monterey the accepted answer appears not to work, so this one is required!Sauers
T
6

cd $ANDROID_HOME/tools/bin yes | ./sdkmanager --update

or

yes | $ANDROID_HOME/tools/bin/sdkmanager --update

Tubby answered 7/11, 2017 at 3:5 Comment(1)
"Automatically"Chemotropism
T
6

for windows, open cmd and enter into bin directory by running command:

cd C:\Users\username\AppData\Local\Android\sdk\tools\android\Sdk\tools\bin

then run sdkmanager --licenses command, it asks to accept licenses.

Toscana answered 8/6, 2019 at 18:15 Comment(2)
Thanks this is what I didPerpetrate
I get Error: Unknown argument --licensesVitriform
C
5

In Windows PowerShell, you can do

for($i=0;$i -lt 30;$i++) { $response += "y`n"}; $response | sdkmanager --licenses

This is much more flexible and requires zero manual intervention. The 30 number is arbitrary, should be enough to cover the number of license acceptances, but can be increased if needed

Crambo answered 2/6, 2017 at 23:41 Comment(1)
Great answer, this worked for me still in 2023. Running above command allowed me to accept all licenses, then I was able to use sdkmanager to install all the packages I needed without issue.Mahon
I
5

I finally found a solution on Windows, to have a real silent and automatic install:

On Windows, the following syntax doesn't work:

echo y | sdkmanager --licenses

It seems the "y" aren't correctly sent to the java program called in the batch.

The workaround is to create a file file-y.txt with several "y", one by line, and to use

call sdkmanager --licenses < file-y.txt

This will create the needed files in the licenses directory. The problem is probably related to the use of BufferedReader in Java

Icebreaker answered 31/1, 2018 at 9:48 Comment(0)
H
4

I tried all the above command on windows 10 machine but the solution was to use the SDKMANAGER to check and accept licenses buy installing missing versions

enter image description here

Hanser answered 1/6, 2018 at 0:11 Comment(1)
None of the CMD commands worked for me, only this solution. ThanksVitriform
P
4

Here is my Docker setup.
You can follow from a plain Linux environment.

Note that yes | and --licenses --sdk_root=${ANDROID_HOME} clauses.
It seems sdkmanager --update reverts agreements, so yes | is appeared twice.

FROM openjdk:8
# Install dev-essential(gnumake)
RUN apt update
RUN apt install -y build-essential
# Set ENV
ENV SDK_URL="https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip" \
    ANDROID_HOME="/usr/local/android-sdk" \
    ANDROID_VERSION=28 \
    ANDROID_BUILD_TOOLS_VERSION=28.0.3 \
    GRADLE_VERSION=4.10.3 \
    NDK_VERSION=r16b
# Download Android SDK
RUN mkdir "$ANDROID_HOME" .android \
    && cd "$ANDROID_HOME" \
    && curl -o sdk.zip $SDK_URL \
    && unzip sdk.zip \
    && rm sdk.zip \
    && yes | $ANDROID_HOME/tools/bin/sdkmanager --licenses --sdk_root=${ANDROID_HOME}
# Install Android Build Tool and Libraries
RUN $ANDROID_HOME/tools/bin/sdkmanager --update
RUN yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;${ANDROID_BUILD_TOOLS_VERSION}" \
    "platforms;android-${ANDROID_VERSION}" \
    "platform-tools" --sdk_root=${ANDROID_HOME}
# Install Gradle
RUN wget https://services.gradle.org/distributions/gradle-${GRADLE_VERSION}-all.zip
RUN mkdir /opt/gradle
RUN unzip gradle-${GRADLE_VERSION}-all.zip -d /opt/gradle
ENV PATH=${PATH}:/opt/gradle/gradle-${GRADLE_VERSION}/bin
# Install NDK
RUN wget https://dl.google.com/android/repository/android-ndk-${NDK_VERSION}-linux-x86_64.zip
RUN mkdir /opt/ndk-bundle
RUN unzip android-ndk-${NDK_VERSION}-linux-x86_64.zip -d /opt/ndk-bundle
ENV PATH=${PATH}:/opt/ndk-bundle

RUN mkdir /application
WORKDIR /application
Provencal answered 21/1, 2019 at 6:18 Comment(1)
"It seems sdkmanager --update reverts agreements, so yes | is appeared twice." Wow, you're right. This is very frustrating but good find.Nedranedrah
F
4

Download the SDK manager from this link. Then unzip and use the following command in terminal.

!tools/bin/sdkmanager --sdk_root=/usr/lib/android-sdk --licenses <<< $'y\ny\ny\ny\ny\ny\ny\n'
Flask answered 30/8, 2020 at 15:56 Comment(1)
That <<< $'y\ny\ny\ny\ny\ny\ny\n' part did the trick on my side. Thanks dude!Archibold
D
3

Copy the entire licenses/ directory and paste it into the Android SDK home directory on the machine where you wish to build your projects.

https://developer.android.com/studio/intro/update.html#download-with-gradle

this resolved the issue for me

Damiandamiani answered 22/3, 2017 at 10:13 Comment(0)
K
3

I had the same error while using Cordova.

The problem was due to the fact that I installed Android Sdk through Android Studio and through apt with apt install android-sdk adb. And Cordova was calling the files installed through apt instead of the files in my home directory.

It worked once I changed the path to SDK in bash:

# Change path
export ANDROID_HOME="$HOME/Android/Sdk/"
echo "Android home = $ANDROID_HOME"
# Accept licenses
eval "${ANDROID_HOME}/tools/bin/sdkmanager --licenses"
# Run Cordova
cordova build android

Then I removed the system files that weren't used anymore: apt remove android-sdk adb.

Kermes answered 16/11, 2017 at 13:37 Comment(0)
V
3

You can accept all the license by executing the following command:

 sdkmanager --licenses

This will prompt you through each licenses you haven't accepted yet and you can just enter y to accept each of them.

Viol answered 11/12, 2017 at 22:19 Comment(1)
"Automatically"Chemotropism
A
3

If you are using Flutter just run:

flutter doctor --android-licenses 

And accept all the licenses needed.

Adham answered 30/6, 2020 at 19:21 Comment(0)
V
3

I have faced two errors while Build my project on Android Studio:

  1. License for package Android SDK Platform 28 not accepted. (while Build my project in Android Studio 4.1)

  2. exception in thread main java.lang.noclassdeffounderror javax/xml/bind/annotation/xmlschema (while running SDK manager to accept license)

For me, it was a java version problem. I have installed JDK instead of java. TO SOLVE THE ISSUE, I did the following steps.

For Windows:

Step1: Download and install the latest JAVA version from https://www.java.com/en/download/

Step2: Search for "View advanced system settings" in the start menu button (windows icon)

Step3: Click on "Environment Variables"

Step4: under "System variables" click on "New", now set "Variable name: JAVA_HOME" and "Variable value: C:\Program Files\Java\jre1.8.0_271" (add latest installed java path here). Then "OK", "OK", and "OK".

Step5: open cmd as an administrator and type the following commands:

  1. cd C:\Users\kevin\AppData\Local\Android\Sdk\tools\bin (*change username here)

  2. sdkmanager --licenses

Press "y" for all questions.

Step6: Restart your Android Studio again.

DONE.

Let me know if anyone having a problem while following the above steps.

Vasyuta answered 30/10, 2020 at 13:23 Comment(0)
I
2

As of July 2019, the easiest method is to use: flutter doctor --android-licenses in the command prompt.

It proceeds to display the unaccepted T&C of SDKs one by one and you're given option to choose 'y/n'. Choose y for all.

Alternately, when you run flutter doctor, it will run Android toolchain diagnostics which displays how many licenses are not yet accepted, and suggests you to run it with the --android-licenses flag.

Inflame answered 9/7, 2019 at 20:38 Comment(1)
I was going to downvote but I am going to make a comment. This is only valid if you have flutter or you are developing with flutter, which is not the case of the OP. sdkmanager is the right way as it is generic enough as it covers everyone that has the Android SDK.Dihedral
R
2

This path has been changed in the recent versions. ./sdkmanager is now in /Library/Android/sdk/cmdline-tools/latest/bin and then just do

./sdkmanager --licenses
Rillet answered 21/3, 2020 at 7:50 Comment(2)
Doesn't work. Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/bind/annotation/XmlSchema Why the in the living eff does Android make this so hard? It's a license. It should be a checkbox.Chronoscope
@MattWest because your environment variables aren't configured correctly. You can use the UI if you're just doing it locallySkiver
R
2

If your "tools" folder is missing on MacOS, then you can do the following-

  1. Use command+shift+A to open actions in Android Studio (the shortcut may vary)
  2. Search for "SDK Manager"
  3. Go to "SDK Tools"
  4. Check Android SDK Platform Tools and click apply.

The tools folder should now appear.

Roesch answered 22/3, 2020 at 12:47 Comment(0)
H
2

Uninstall the package with the licence fail in the android sdk manager tab. At reinstall, a prompt will ask you to accept the licence

android sdk manager

Hothouse answered 20/10, 2021 at 23:19 Comment(0)
T
1

I run

#react-native run-android 

from terminal and met that problem. For manually, go to Android Studio -> Android SDK -> SDK Platform Click Show Packages Detail and check :

+ Google APIs
+ Android SDK Platform 23
+ Intel x86 Atom_64 System Image
+ Google APIs Intel x86 Atom_64 System Image

When install packages, check accept license => can solve the problem.

Tome answered 28/6, 2017 at 9:55 Comment(0)
P
1

On Mac OSX, navigate to the sdk/tools/bin

Then run ./sdkmanager --licenses, and accept all the licenses.

Postobit answered 28/1, 2018 at 18:34 Comment(0)
P
1

On Windows 10 opening cmd with administrator privileges and then typing cd C:\Program Files (x86)\Android\android-sdk\tools\bin\ and then sdkmanager --update worked for me. After that I just had to press "y" twice in order to accept the licenses.

Phene answered 29/11, 2018 at 14:17 Comment(1)
You still have to interact. That's the issue of the OP's question. It should be silent upgrades. THis won't with a pipelineSkiver
P
1

In windows go to command prompt and type the following commands:

cd C:\Users\<Username>\AppData\Local\Android\Sdk\tools\bin
sdkmanager --licenses

This will generate the licences keep pressing "y" to accept all licences.

Pentameter answered 30/7, 2019 at 8:2 Comment(1)
Error: Unknown argument --licensesVitriform
W
1

I had this issue and I though that these answers didn't help then I figured out that my environment variables wasn't correct, although I was able to do sdkmanager command anywhere, so make sure that the environment variable is set correctly:

  1. In the environment variables define a new variable with ANDROID_SDK_ROOT as a name and give it a value of where the sdktools are located eg.: C:\Android\sdk\

  2. Edit your path to add the created variable to be %ANDROID_SDK_ROOT%\tools\bin\ restart you cmd.

  3. Run the command that where mentioned in the answers: sdkmanager --licenses

  4. Install the desired packages using sdkmanager "packageName".

Welldone answered 28/12, 2019 at 19:46 Comment(0)
S
1

Turns out if you didn't install any SDK, Android Studio also shown "you haven't accept the license"...Such deceiving message, normal people would assume it implied SDK were already installed but anyway. In the Studio's SDK manager, you can just manually select the missing sdk to download and install and it handles license too. You just need to restart the Android Studio.

Here is a YT video showing your where SDK manager is.

Slaughterhouse answered 26/9, 2020 at 5:6 Comment(0)
M
1

On Windows, with sdkmanager in your PATH and WSL installed and configured, the following one-liner should work with every default distro (in fact I can't think of a counterexample):

wsl --exec yes "y" | sdkmanager --licenses

If that's not enough, you might want to look at this script (disclaimer: it's mine).

Matelote answered 24/2, 2021 at 11:7 Comment(0)
C
1

I did successfully accept the license with the command

sdkmanager --sdk_root=$ANDROID_HOME --licenses

HOWEVER, the license was not saved anywhere. I would run the above command many times to accept all licenses but kept asking for them again. So the solution was to simply add sudo to the command...

sudo sdkmanager --sdk_root=$ANDROID_HOME --licenses

Thie successfully generated multiple license files under $ANDROID_HOME/licenses

Cottonseed answered 25/9, 2022 at 6:6 Comment(0)
B
1

If you are running inside a Docker container or creating a Docker image, to avoid docker executor failed running code 141, you should use the following:

RUN (yes "" 2>/dev/null || true) | sdkmanager --licenses
Botello answered 4/4, 2023 at 20:52 Comment(0)
W
0

I navigate to:

/usr/lib/android-sdk/licenses

and I typed in terminal:

echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > $ANDROID_SDK/licenses/android-sdk-license"

With root permission. And it works for me now.

Wilda answered 31/7, 2017 at 1:54 Comment(0)
M
0

FOR REACT NATIVE APPs:

If you are having this problem for a React Native app, in addition to above mentioned steps, make sure you have the local.properties file in the android directory(AppName/android) of your app which points to your 'sdk' directory:

sdk.dir=/PATH_TO_SDK/
Muns answered 3/12, 2017 at 0:47 Comment(1)
Setting your android_home variable properly works for react native apps as well. Personally, I set it in my IDE run configuration.Ragin
E
0

I got the same error of license not accepted...trying to set up android environment to run a React-native app in android emulator for API level 23.

I did the following:

Based on the link https://developer.android.com/studio/intro/update#download-with-gradle

Verified if the license got downloaded via the Android studio 3.1.3's SDK manager.

Set up ANDROID_HOME as C:\\Android\Sdk

(it was installed in C:\Users\username\AppData\Local\Android\Sdk)

The error got resolved after retrying the build in a new command prompt.

Eddy answered 19/6, 2018 at 8:25 Comment(0)
G
0

After trying many the possible solutions mentioned by members from the community I just found there might have been different problems overtime so most of the solutions are outdated.

Currently, and as I posted in the Travis community, Travis should be accepting all the licenses by default, but it kept complaining about not accepting the licenses 27.0.3 which shouldn't happen.

Adding:

before_install:
  - yes | sdkmanager "build-tools;27.0.3"

should fix the problem, we we would be able to even use an a 3.+ version of Android Gradle Tools without needing to even declare what version of build-tools we are using:

android:
  components:
    # Use the latest revision of Android SDK Tools
    - tools
    - platform-tools
    - tools

    # The SDK version used to compile your project
    - android-${ANDROID_API}
    # - build-tools-28.0.3    # WE DONT NEED THIS ANYMORE FROM AGP 3.+

    # Additional components
    - extra-google-google_play_services
    - extra-google-m2repository
    - addon-google_apis-google-${ANDROID_API}

This works as October 29th, 2018. Travis might make changes in the future so good luck with that!

Guertin answered 29/10, 2018 at 14:1 Comment(0)
S
0

I've spent a half day to looking for solution for Bitbucket Pipelines

If you are using Bitbucket Pipelines and you have the issue with accepting all SDK licences, try to use this code in your .yml file:

image: mingc/android-build-box:latest

pipelines:
  default:
  - step:
      script:
        - chmod +x gradlew
        - ./gradlew assemble

It should works.

Shalandashale answered 4/12, 2018 at 17:42 Comment(0)
C
0

It's late but all above mentioned solutions didn't worked for me and finally this single line would accept all android licences.

yes | sdkmanager --licenses && sdkmanager --update
Chabazite answered 25/1, 2019 at 10:6 Comment(0)
N
0

I had similar issue, I solved it by opening Android Studio. The fact was that Android Build Tools 26.0.2 wasn't installed. An error came to warn me about it, I installed it and sync it with project. Problem solved :)

Nighthawk answered 7/2, 2019 at 10:37 Comment(0)
Q
0

All I had to do is yes | sdkmanager --licenses > /dev/null, and everything was accepted, and no huge output on the console or travis log or wherever. It also works like yes | sdkmanager "tools" > /dev/null for example.

Quasar answered 11/7, 2019 at 13:55 Comment(0)
E
0

please mind your sdk location, I change the default folder, so i cant find sdkmanager in " ~/Library/Android/sdk/tools/bin/"....

Elegancy answered 19/4, 2020 at 7:34 Comment(0)
D
0

You have not accepted the license agreements of the following SDK components: [Android SDK Build-Tools 24, Android SDK Platform 24]. 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. 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

Uninstall and Reinstall the Android SDK Platform 24 and then the License agreements will appear, Accept the agreements and the problem will be solved!

Declamation answered 27/3, 2021 at 19:27 Comment(0)
I
0

In window this problem can be solved as: Open CMD in window run this command in CMD

flutter doctor --android-licenses

then enter y for accepting each licenses. the CMD will show you each license one by one which you have to accept by entering y in CMD prompt. It solved my problem. I hope this will also work for you

Insignificancy answered 10/6, 2021 at 9:52 Comment(0)
S
0

I solved this because I can't use the UI. It's for pipelines in Azure. (Windows) none of the answers worked for me, but the @moobyfr posting with file-y.txt pointed me in the right direction

This works on the fresh install. You don't need to use Android Studio at all or any UI.

  1. Create C:\AndroidTest
  2. Create ENV variable called ANDROID_SDK_TOOLS with path from #1
  3. Create ENV variable called JAVA_HOME and give it the folder path
  4. open up CMD in Admin mode and go to C:\Android
  5. curl --output test.zip https://dl.google.com/android/repository/commandlinetools-win-8092744_latest.zip
  6. Use your favorite command line to extract the zip into the same folder
  7. Navigate to the bin folder ( cmdline-tools\bin )
  8. In this folder, create a file like mentions in another answer. file-y.txt and add a bunch of y's. Basically type y on each line. I did 20. So you have 20 lines with 1 y on each
  9. sdkmanager "platform-tools" "platforms;android-29" --sdk_root="C:\AndroidTest\cmdline-tools\bin" < file-y.txt

This will download all the sdk's you need without the need for gradle/AndroidStudio/Xamarin. It's great for pipelines to download entire SDK support on the fly

If you have an issue, you need to type sdkmanager --licenses --sdk_root="C:\AndroidTest\cmdline-tools\bin" < file-y.txt
But, I doubt so.

Skiver answered 3/2, 2022 at 23:27 Comment(0)
M
0

In your Gitlab/GitHub pipeline you can:

ANDROID_COMPILE_SDK: "33"
ANDROID_BUILD_TOOLS: "30.0.3"
ANDROID_COMMAND_LINE_TOOLS_URL: "commandlinetools-mac-8512546_latest.zip"

curl https://dl.google.com/android/repository/${ANDROID_COMMAND_LINE_TOOLS_URL} -s -o 'android-clt.zip';
mkdir -p android-sdk-mobile;
unzip -o -d android-sdk-mobile android-clt.zip;
echo y | android-sdk-mobile/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-mobile/cmdline-tools "platforms;android-${ANDROID_COMPILE_SDK}";
echo y | android-sdk-mobile/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-mobile/cmdline-tools "build-tools;${ANDROID_BUILD_TOOLS}";
echo y | android-sdk-mobile/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-mobile/cmdline-tools "tools";
echo y | android-sdk-mobile/cmdline-tools/bin/sdkmanager --sdk_root=android-sdk-mobile --licenses;
Mechanistic answered 2/10, 2023 at 11:59 Comment(0)
S
-1

There are 2 approach that I can found to this problem.

  1. Update sdk tools with command window by accepting licence agreement as follows, just change the version according to your need.

    android update sdk --no-ui --filter build-tools-25.0.2,android-25,extra-android-m2repository

  2. Second approach is copying licence folders to Android root directory. Goto your development machine open Android Studio. Find your sdk location from Project Structure menu. (C:\Users\UserName\AppData\Local\Android\sdk). Under that directory there must be a licence folder. Copy that folder with the content. Paste that folder in your Jenkins server machine (or where you face with this problem) under android sdk root folder. (C:\Users\UserName.jenkins\tools\android-sdk)

Sweeting answered 19/2, 2017 at 20:27 Comment(1)
"Automatically"Chemotropism
O
-1

Finally, this 2 simple steps worked for me on windows 10.

1) Make sure you update your android build tools and api. On your Android Sdk Just click on install packages to install available updates.

2) Start your Android Studio and you'll be prompted to install the reqiured build tools for the already updated api and tools, This will install the build tools properties including the licences and your done.

Orthocephalic answered 30/5, 2017 at 10:54 Comment(1)
"Automatically"Chemotropism
J
-1

in Windows : Open Cmd:

go to install path

falow common: cd D: or C:

go to sdk directory

with cd common

tools/bin/sdkmanager --licenses

Jericajericho answered 24/10, 2020 at 22:22 Comment(0)
G
-1

WINDOWS SOLUTION

  • Open Terminal o Windows Power Shell

  • Go to Android SDK folder

Generally this folder can be find in C:\Users(your-windows-user)\AppData\Local\Android\Sdk\tools\bin

  • Begin in "....\Sdk" folder enter to \tools\bin

Finally path C:\Users(your-windows-user)\AppData\Local\Android\Sdk\tools\bin

  • Verify that sdkmanager.bat is in location using ls command

  • Excute the next command .\sdkmanager.bat --licenses

  • Then the terminal will show 7 documents, you need put yes In each one

Galbreath answered 27/10, 2020 at 17:46 Comment(0)
C
-1

as pointed out in the comments by @MoOx, on macOS, you can do

yes | sudo ~/Library/Android/sdk/tools/bin/sdkmanager --licenses

Countersign answered 16/6, 2021 at 7:44 Comment(0)
T
-3

THIS IS A QUICK FIX; 1. GO TO C:\Users(YOUR USER NAME)\AppData\Local\Android\sdk\build-tools 2. DELETE THE PREEXISTING FOLDER OF THE VERSION THAT HAS NO LICENSE. 3. GO TO ANDROID STUDIO AND MANUALLY INSTALL THE TOOL AGAIN(this will give you an opportunity to accept the license ) ........ (problem solved)

Trireme answered 13/2, 2019 at 10:59 Comment(1)
why capital case... which is interpreted as shoutingGrower

© 2022 - 2024 — McMap. All rights reserved.