I just finished installing Android Studio and the JDK. Everything worked fine while I looked around the new interface. No errors or anything. After I checked for updates I went from version 0.5.2 to 0.6. When I restarted I got the error
Error:The SDK Build Tools revision (19.0.3) is too low for project ':app'. Minimum required is 19.1.0
Which SDK is it referring to and shouldn't it update along with Android Studio? Before I updated I did not have this message.
So Android Studio version 0.6 requires the Android SDK build tools to be 19.1 instead of the old 19.0.3.
To install this, follow these steps:
Close all open projects.
On the main Android Studio window, press Configure
Then click SDK Manager
Once inside find the following build tools version:
Then tick the box and install the package.
Once your done with that, close the SDK Manager, restart Android Studio, and you should be good to go!
EDIT:
One more thing you need to do:
Open your project.
Navigate to your build.gradle file located inside your module. For you, I think it's in the app folder.
Open the file.
Now you should see something like this:
Where it says buildToolsVersion in the quotes, replace 19.0.3 with 19.1.0. Now sync gradle files and everything should be solved.
Related
I while building my project I am getting this error-
Error : [installPlatformSDK] build tools version 25.0.2 is not installed in SDK.
Weird thing is that this is present in my SDK.
Inside C:\xxxxxxx\AppData\Local\Android\android-sdk\build-tools, I have a folder 25.0.2 and it contains the build tools.
Now, if I change the build tools version in Gradle, from, say,
buildToolsVersion '25.0.2'
to
buildToolsVersion '25.0.1', I get this :
Failed to find Build Tools revision 25.0.1
Install Build Tools 25.0.1 and sync project
After I install build tools 25.0.1, I again get the same, first error (not found).
These are three TRICKS AND SUGGESTIONS I use when DESPERATE for Android Studio to behave:
1) Clean-->Rebuild-->Run (Clean and rebuild are options in the Build Menu);
2) invalidate cache and restart [Android Studio]
3) updating dependencies and the like. (I use build tools 27.0.3, for example, have installed new gradle plug-in, and created a wrapper using an updated version?) (see this link for more details)
4) throwing up my hands and asking someone to see if they can compile my code on their machine. In my most recent coursework, there were half a dozen times where my rig kicked out errors, but it worked for others. I ended up circling back occasionally and miraculously some errors worked themselves out.
As of today I've been running into an error setting up new projects in Android Studio. Right after creating a blank project the log mentions "Gradle sync failed: failed to find Build Tools revision 24.0.0 rc1."
First I looked online to see how to resolve this and came across this similar question, and followed the solution given (setting the build tools version in the module settings). However, this results in Android Studio telling me that the method "android()" cannot be found and "The project 'TestBlankApplication' may be using a version of Gradle that does not contain the method."
Additionally, the SDK Manager informs me that I have Build-tools 24 rc1 installed. So I do not know why Android Studio cannot find it.
Screencap of SDK Manager showing 24 rc1 installed:
Does anyone know how this can be resolved? Thank you.
Why you got this error:
Android studio does not come with build tools for different android versions when you download it. It also does not make sense since there are multiple versions of build tools and each of them will take hundreds of megabytes on your hard drive. This is why Android Studio installation package is 1 GB while Xcode, which has all the build tools, is 6 GB
When you choose a specific build version in the build.gradle file, your android studio may or may not have that version of build tool installed. And if not, you will see the error complaining about it.
How to fix it
You just need to install the specific version of build tool mentioned in build.gradle like this:
Click File > Settings (on a Mac, Android Studio > Preferences) to
open the Settings dialog.
Go to Appearance & Behavior > System Settings > Android SDK (Or
simply search for Android SDK on the search bar)
Go to SDK Tools tab > Check the Show Package Details check box
Select the specific version of the build tool and click on the Apply
button
After the installation, sync the project
Demos
(I choose a different version just to show you how to apply the changes by that apply button :) )
And then sync the project. The error is gone now!
Try to change the buildToolsVersion for 23.0.2
in Gradle Script build.gradle (Module App)
and set buildToolsVersion "23.0.2"
then rebuild
Follow the below procedure to solve the error.
Go to File -> Project structure.
From the drop down box, you will know all the version of build tools that are installed in your android studio.
Look for a higher version. If Gradle cannot find 24.0.0, check if 24.0.1 is present in drop down.
Do a complete code search. Find all the places where "24.0.0" is found. Replace it with "24.0.1"
Do a gradle sync.
I had same problem and eventually found out that in file build.gradle the version does not match the version of buildTools in my installed sdk.
(because I imported project done at home on different computed with updated sdk)
before:
build.gradle(app): buildToolsVersion "24.0.2"
Android\sdk\build-tools: file "25.0.1"
fixed:
build.gradle(app): buildToolsVersion "25.0.1"
Then just sync your project with gradle files and it should work.
SDK tools required build tool version installation helped me.
You just need to install required build tool version from,
SDK Manager -> SDK tool -> Show Package details -> Select required build tool version and install it.
Go to Build Gradle (Module:app)
Change the following.
In my case, I choose 25.0.3
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.cesarhcq.viisolutions"
minSdkVersion 15
targetSdkVersion 25
After that, it works fine!
Android Studio updating didn't work for me. So I updated it manually. Go to your sdk location, run SDK Manager, mark desired build tools version and install.
I ran into this problem after a fresh install of Android Studio (in GNU/Linux). I also used the installation wizard for Android SDK, and the Build Tools 28.0.3 were installed, although Android Studio tried to use 28.0.2 instead.
But the problem was not the build tools version but the license. I had not accepted the Android SDK license (the wizard does not ask for it), and Android Studio refused to use the build tools; the error message just is wrong.
In order to solve the problem, I manually accepted the license. In a terminal, I launched $ANDROID_SDK/tools/bin/sdkmanager --licenses and answered "Yes" for the SDK license. The other ones can be refused.
faced the same problem: Gradle sync failed: failed to find Build Tools revision x.x.x
reason: the build tools for that version was not down loaded properly
solution:
Click File > Settings (on a Mac, Android Studio > Preferences) to open the Settings dialog.
Go to Appearance & Behavior > System Settings > Android SDK (Or simply search for Android SDK on the search bar)
Go to SDK Tools tab > Check the Show Package Details checkbox
uncheck the specific version to remove it.
click apply.
then follow the steps 1 to 3 and 6.
Select the specific version of the build tool and click on the Apply button
After the installation, sync the project
Another thing is that all libraries from google (e.g. support lib, CardView and etc.) should have identical versions
I ran into a same problem.
I was running portable version of android studio so downloaded a package from https://developer.android.com/studio/#downloads
and installed it, and like that, done!
1) You need to change to version that is available on you studio
2) Here is how you find out version that is available for your studio
Go to File -> Project structure.
source is from #Siddarth Kanted Thanks to Siddarth Kanted.
3) And when you want to install more versions of build tool you can learn it from #Fangming user from this post.
easy working solution.
I am using new android studio .when i download and install it there was no issue. But now when i try to create a new project it's show this error
Your Android SDK is out of date or is missing templates.
Please ensure you are using SDK version 22 or later.
As you know the latest SDK version is already bundled with android studio .I tried re-installing android studio still that error exist.
But it works fine while importing a project or opening an old project. I am facing this only during while trying to create a new project
Somebody help me to resolve this
Note : Im using Mac 10.6.8
EDIT : Screen Shot
I check my SDK manger which is bundled with android studio It's showing i'm using latest version
I've occurred this problem, what I did is.
On Main Menu, Click, Configure
Click Project Defaults
Click Project Structure
In Platform Settings > SDK, Choose the Build Target. Restart the IDE.
I can't comment (Low reputation) but have you tried checking the android sdk manager? See if anything is outdated or missing in tools
Then follow the answer above me, or check module settings > Dependencies > Module SDK and verify that it's android 4.2.2
When I boot up Android Studio and select "New Project..." and go through creating a new project, I get this popup error:
Failed to import new Gradle project: failed to find Build Tools revision 17.0.0
Consult IDE log for more details (Help | Show Log)
I would love to consult the IDE log, but I haven't even managed to get into the application to do much of anything. I've went through the preferences multiple times to see if I can set a path for the Build Tools, but I can't find much of anything. How do I fix this, or how do I get into the application without opening a project so I can at least see the logs?
After spending a few hours: I restarted the Android SDK Manager and at this time I noticed that I got Android SDK Platform-tools (upgrade) and Android SDK Build-tools (new).
After installing those, I was finally able to fully compile my project.
Note: The latest ADT (Version 22) should be installed.
As of May 2020, A really straightforward solution using Android Studio:
Open Android Studio
From the top, choose File > Settings > Appearance & Behavior > System Settings > Android SDK
click on the tab SDK Tools at the top. Then highlight Android SDK Build Tools from the list.
Check "Show Package Details" check box, choose the build tools version you need and then click Apply.
Look in the SDK Manager what is your highest Android SDK Build-tools version, and copy this version number in your project build.gradle file, in the android/buildToolsVersion property (for me, version was "18.1.1").
Hope it help!
This is what I had to do:
Install the latest Android SDK Manager (22.0.1)
Install Gradle (1.6)
Update my environment variables:
ANDROID_HOME=C:\...\android-sdk
GRADLE_HOME=C:\...\gradle-1.6
Update/dobblecheck my PATH variable:
PATH=...;%GRADLE_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools
Start Android SDK Manager and download necessary SDK API's
It happens because Build Tools revision x doesn't exist.
Today, the latest version is 23.0.2 (subject to change all the time).
The buildToolsVersions you want are included in the Android SDK, normally installed in the <sdk>/build-tools/<buildToolsVersion> directory.
Don't confuse the Android SDK Tools with SDK Build Tools.
Change in your build.gradle's buildToolsVersion to some version installed in <sdk>/build-tools
android {
buildToolsVersion "23.0.2"
// ...
}
Whenever you will try to run a project with build tool version not present in studio, You will face this error.
As of now in 2017, It has been made really simple by Android Studio.
It will prompt you about this issue, along with something like this
You just have to click on it and the system will download to the build version required to run the project.
I had the API 17 installed but that was not enough. What I really need installed is the "Android SDK Build-Tools 17".
You can locate your "Android SDK Build-Tools X" inside the first child, named "Tools", in the "Android SDK Manager".
in your Project perspective, look for Application --> build.gradle and edit this lines
android {
compileSdkVersion "android-N"
buildToolsVersion "24.0.0 rc1"
like this:
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
I had this problem recently, my project didn't include local.properties file.
Check local.properties file if it includes sdk.dir with correct path to sdk
i think you can download the latest android SDK and use it.i do this and fixed the problem and work well.
here is the link:
http://developer.android.com/sdk/index.html#download
Try to run gradle at the command line first. It might prompt you to setup and environment variable:
export _JAVA_OPTIONS="-Xms256m -Xmx1024m"
Read more here: 1, 2
Further make sure that the Android SDK build tools (adb, aapt, dx, dx.jar) are available in the PATH. If not you can create symlinks at the appropriate locations. They changed with the release of new SDK versions. Here is a shell script which creates the symlinks within the $ANDROID_HOME folder for you.
Basically error saying your are missing "Android SDK Build-tools" installed.
This worked for me after I tried many solutions:
For some reason the adb process didn't restart itself after installing new packages. Manually killing adb.exe and attempting to import the project another time solved this problem for me.
Uninstall the Android SDK Tools and then reinstall them from Tools > SDK Manager.
I downloaded Android Studio, fixed the JDK Environmental Variable, but when I try to create a New Project, I get an error that says
Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later.
I opened up android.bat in the SDK but it said I was already running version 22.
Anyone else getting this?
It just happened because you already have your SDK setted up for Android Developers Bundle with eclipse. Simply open your SDK manager in the ADT Bundle and update you Android SDK Tools from 21.1 to 22 and you are good to go.
Worked for me.
First of all, on Windows and Mac, the individual tools and other SDK packages are saved with the Android Studio application directory.
Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\
Mac: /Applications/Android\ Studio.app/sdk/
Make sure your android-sdk-path is correct and the sdk tool version is 22 or later.
Then open the Configure--> Project Defaults --> Project Structure, set your project sdk is Android SDK.
enjoy.
As for me, I make next:
Start Eclipse -> start SDK -> install selected packages
Eclipse -> Help -> check for updates -> update all
Android Studio -> configure -> Project Defaults -> Project structure -> Press plus -> Android SDK -> put path to the same sdk that you use in eclipse (run SDK and in top panel you can see this path).
Apply
I did all of the above and still got the ....missing templates blah blah. What worked for me was to go to Configure>Project Defaults>Project Structure>Project and select Android SDK, then Configure>Project Defaults>Project Structure>SDKs map the Android SDK home path to the sdk folder in the ADT bundle (for me it was C:\Users\home\Toolbox\adt-bundle-windows-x86\sdk).
I then selected Android 4.1.2 clicked apply and it worked.
I then went back to the Configure>Project Defaults>Project Structure>SDKs and then selected Android 4.2.2 and now that worked too (strange though as when I selected Android 4.2.2 first time the Apply button was grayed out)
I ran into this problem because I wanted to update from an old version. In doing this, I downloaded the latest version from the Project Tools Site, then unzipped and copied over my existing Android Studio install which did have the sdk folder inside.
Going back and looking at it, I see quite plainly that there was a note that I previously ignored:
NOTE: These .zip files do not contain an embedded SDK install. If you have an existing install of Studio which contains an embedded SDK, if you upgrade by installing one of these zips, make sure you copy over the SDK as well.
For OS X users, this means going to your old version of Android Studio (if you haven't copied over it yet) and right-clicking and selecting Show Package Contents, then copying the sdk folder that's inside, then putting that into the new version of Android Studio.
If, like me, you already copied over the old version, then you'll need to redownload the old version first which does contain the SDK.
They released a new sdk today. You need to update to it.
I was still hitting this, and figured it was due to something I had misconfigured (which turned out to be the case). The error message is a little confusing, too, because I believe that they are referring to is the version of the ADT tools, not the SDK. For example, the version of Android 4.3 (which is about the latest) is 18.
As of the latest source for Android Studio (which you can clone from here: https://android.googlesource.com/platform/tools/adt/idea), that message is generated from NewProjectWizard.java at about line 75 if TemplateManager.templatesAreValid() is false. And it checks that by looking for the existence of the file [rootTemplatesFolder]/gradle/wrapper/gradlew .
It gets the [rootTemplatesFolder] from the SDK(s) you specified in the "Project Structure" settings for default projects. In my case, I had several specified - both the new ones pointing to the sdk directory that's (thankfully) part of the Android Studio, and a few old ones I had somewhere else. I should not have included the old ones at all, but I'm a newb to this and the GUI let me do it. The NewProjectWizard was checking the tools area of that one first, which did not have that file, since the tools version with it was older than version 22.
I had to use dtruss to watch the system calls of Android Studio to see where it was looking for that file, at which point I could tell what my silly problem was.
I have a few more notes on this, including a screenshot of my particular misconfiguration, at http://www.nowherenearithaca.com/2013/08/solved-android-studio-and-your-android.html
Note: It seems you have to restart Android Studio for the "New Project Settings" here to take effect.
for ubuntu:
Open sdk manager from Android Studio or configuration.
make sure you download or update the latest release SDK and build tools.
Set the sdk location as (your android folder/sdk)
It'll download and install sdk
just Update sdk with sdk manager
it worked for me