Update Sdk Failed to Read or Create Install Properties File.
When you download the latest Android SDK tools version using the command line to install SDKs and you but endeavor to build gradle then this fault shows upwardly:
Failed to install the post-obit Android SDK packages as some licenses have not been accepted. platforms;android-27 Android SDK Platform 27 build-tools;27.0.3 Android SDK Build-Tools 27.0.3 To build this project, take the SDK license agreements and install the missing components using the Android Studio SDK Manager. Alternatively, to transfer the license agreements from one workstation to some other, run into http://d.android.com/r/studio-ui/consign-licenses.html
Yous may face this fault even later typing y equally the answer for the question: Do you accept the license 'android-sdk-license-c81a61d9' [y/n]: y. So we need to look at why this mistake is popping up? Considering of this error, we cannot compile our projection. And so In this article, nosotros will talk about how to solve this error using five different methods. But earlier direct jumping to solutions start let'south come across something about Android SDK.
What are Android SDK packages?
SDK stands for software development kit or devkit for short. The Android SDK consists of an emulator, development tools, sample projects with source code, and the required libraries to build Android applications. The Android SDK Manager, manages diverse Android SDK versions, tools, and various other useful packages that y'all tin select and download, to proceed your development surroundings up-to-date.
How To Solve Failed to install the following Android SDK packages?
Method ane
Yous need to have the licenses earlier building. According to Android SDK docs, you can use the following command depending on the SDK director location: Docs on –licenses pick seems to be missing though. yeah | sdkmanager –licenses
Windows:
Stride 1: Navigate to %ANDROID_HOME%/tools/bin .
%ANDROID_HOME% is the path to SDK. By default information technology is located at : C:\Users\UserName\AppData\Local\android\Sdk . If you take moved SDK to another directory location then y'all can follow beneath steps :
- Search for edit the system environment variables.
- Then in the environment variables, you volition meet ANDROID_HOME.
- Navigate to that path in cmd
Step ii:
After successfully navigating just blazon below command and you lot are washed.
sdkmanager –licenses
GNU/Linux Distributions:
yes | ~/Android/Sdk/tools/bin/sdkmanager –licenses
macOS:
export JAVA_HOME=/Applications/Android\ Studio.app/Contents/jre/jdk/Contents/Home
aye | ~/Library/Android/sdk/tools/bin/sdkmanager –licenses
Flutter Users:
Just type palpitate doctor –android-licenses in the final and await for few seconds. You lot will see "All SDK packet licenses accepted" on your screen.
Method 2
Pace i: In Android Studio go to Tools > SDK Manager.
Footstep 2: Go to the SDK Tools tab as shown in the below prototype.
Step iii: Select the Android SDK Control-line Tools (latest) and download by pressing Utilise.
Method 3
in Windows Os go to your sdkmanager path then execute
./sdkmanager.bat –licenses
Y'all can find your sdkmanager at: \Android\tools\bin
IF you lot don't know where is your SDK located, so follow these steps:
- Open up Android Studio
- Navigate to Your Project > Files > Setting > Appearance and Behavior > Android SDK
Method 4
Step 1:Go to your $ANDROID_HOME/tools/bin and fire the cmd and type the beneath command:
./sdkmanager –licenses
Accept All licenses listed there.
Stride 2:
After this just become to the licenses folder in SDK.
Bank check that it's having these five files:
- android-sdk-license
- android-googletv-license
- android-sdk-preview-license
- google-gdk-license
- mips-android-sysimage-license
Step three:
Requite a retry and build once again, still, Jenkins giving 'licenses not accepted" then you accept to requite full permission to your 'SDK' directory and all its parent directories. Hither is the control:
sudo chmod -R 777 /opt/
If you having sdk in /opt/ directory.
Method 5
For Windows users:
Step one: Go to the location of your sdkmanager.bat file. By default, it is at Android\sdk\tools\bin inside the %LOCALAPPDATA% folder.
Stride 2: Open a last window there past typing cmd into the championship bar. Then get to the above path(Android\sdk\tools\bin equally highlighted by the white line in the below image) and type :
sdkmanager.bat –licenses
Have all licenses with 'y'.
Want a more fast-paced & competitive environment to learn the fundamentals of Android?
Click here to head to a guide uniquely curated past our experts with the aim to make you lot industry ready in no time!
Source: https://www.geeksforgeeks.org/how-to-fix-failed-to-install-the-following-android-sdk-packages-as-some-licenses-have-not-been-accepted-error-in-android-studio/
0 Response to "Update Sdk Failed to Read or Create Install Properties File."
Post a Comment