Reputation: 13
So coming straight to the issue on hand, I have installed the Android studio lastest version (3.6.3). But whenever I try to build a project and run it on Emulator it shows me an error that "I have not accepted the SDK licenses". It is not the only error that appears. I have attached a screenshot that you can see to have an idea of what the error actually is:
I tried to use the cmd method that accepts all the licenses but it is not working and cmd gives error "The system cannot find the path specified"
It is possible that I am accessing it wrong I am a complete cmd illiterate. After checking, there is no \tools\bin inside SDK folder
Also, I have tried reinstalling.
Kindly help me out. All my work is stuck because of this error.
Upvotes: 1
Views: 2299
Reputation: 99
This came up whilst googling the solution so I will pop the Linux solution here, which may also help windows users. The tools to accept the license have been moved.
Here's how I got the tools in Android Studio(Giraffe | 2022.3.1 Patch 2) on Linux.
1. Click Tools > SDK Manager
2. Along the top, we have tabs.
Go to the SDK Tools tab and enable "Android SDK Command-line Tools(latest)".
Then Click Apply
3. Remember this path, we will need to open a terminal and cd to the SDK directory.
4. Open a terminal, cd to the SDK directory
Type the below into a terminal, replacing the sdk folder with the one you found in step #3.
# cd to the sdk folder
cd $HOME/Android/SDK
cd cmdline-tools/latest/bin
./sdkmanager --licenses
# press 'y' to accept the licenses.
And yes, you lucky winner, you have just accepted the google license. Thank you for participating in the license agreement marathon. And thank you to google for making it such a pleasure to accept.
Upvotes: 1
Reputation: 18002
There is usually a link to the missing tools in the error console.
If not go in the menu to Tools / SDK
And then you'll be prompted to accept the licenses. Be careful because it's a radio button and is a little bit hiden.
If it fails after doing this watch in the console if there is a link to install the missing tools or other clues of other things missing apart from the build tools and the SDK platform.
Upvotes: 1
Reputation: 13
The issue is resolved. How I resolved it?
It was pretty easy though I just Installed three (3) more SDK-Platforms i-e Android 9.0, Android 8.1 and Android 8.0 by going to tools\sdkmanager\sdk-platforms in Android Studio IDE
I don't know why it fixed it but it did.
Upvotes: 0