Unable to resolve target 'android-17' - android

I know there are some sort-of duplicates of this, but none of the answers have been able to help me so far.
When I open a project, I get the following error:
[2014-01-07 14:18:00 - Permissions] Unable to resolve target 'android-17'
Does anybody know what may be the problem here?

You can right click on your project -> properties -> Android -> Select the Target android version you want to compile and Apply !
If you don't have any target versions to compile, you probably need to download them on your SDK Manager

Open your Android SDK Manager, and make sure your SDK API is installed
You might have several Android SDK folders installed, like me; check that your workspace build path is the one your machine defaults to.

You are probably trying to use a library that was built using API 17 and you do not have it installed. If you are using API 18+ you will be fine.

goto your sdk manager.exe open it, check the API 17 checkbox and click the 'install x packages' button, this will download and install these packages, if the project still shows error go in your project build path and fix the library path error if any

Sometimes the error can appear when you are working with source code built with an ADT that is a higher version than what you are currently using. It could be worth it to see if ADT has a later version than you are working. Sometimes ADT (especially with Eclipse. Link to get new here: https://developer.android.com/sdk/index.html) cannot find updates when asked to find them so you may need to install the newest version and overwrite/delete the old version

The target API in project.properties may be different from the one you have installed. This may happen if you reinstall Eclipse, for example. Open the Android SDK Manager and check to see which version of the API you have installed. Then go to project.properties and set "target=android-xx" when "xx" is your API version.

It's very simple:
Click Android SDK Manager
Download Android 4.2.2 (Api 17)
After install Android 4.2.2(Api 17)
Click right on project --> Properties --> Android --> Target Build Target
Choose Android 4.2.2 Api 17.
Finish

Related

ERROR: Module 'app': platform 'android-28' not found. and Design editor is unavailable until after a successful project sync

So, I am new here just installed Android Studio and then wanted to create a basic activity. But the thing is they want me to install the SDKs and Haxm which is not being installed through SDK manager. I have tried a lot and have used all the ways stated in Stack-overflow to get rid of this but none of their ways has functioned.
Go to Tools->sdk manager->install API Level 28 then restart.
go to Tools
Select SDK Manager
Under SDK Platforms select Android 9.0 (Pie) (API 28)
Then Apply and Download the API
I face the same problem.
First, install API Level 28 & Restart the Android studio.
First of all!
you need to update your sdk manager
that too essential tools are:
build tools
platform tools
tools
and android Emulator
.....
Now go to LOGCAT , click on configure sdk.....
put it to latest and click autoconfig button for each bar.
thats it rebuild it!
You are done with 100 percent% successful error solving,
Your Activity.xml file will be displayed with out any warning or error!
If you already opened a project, the "SDK Manager" can be found on the main screen
Then you can add the missing sdk.
After reinstalling and upgrading my android studio to android 4, I faced the same challnge. but what I did was to go to tool->sdk manager and then install some other APIs including the error messages API 28 not installed and it works fine.
Open Android Studio in order to see 'Welcome screen' (if a project will directly open, you can close it in order to go to the 'Welcome screen')
There is a 'Configure' menu in SDK manager (first option from drop down list).
Open then select the needed android SDK version(s), press ok and wait for downloads (it will take some time until everything is installed).
After this, when you open a project, the 'tools' menu is updated with all missing content.
I faced the same problem but I uninstalled android studio and reinstalled it while connected to the internet . it downloaded the updated SDK and other tools by its self . it works perfectly
Check the buildToolsVersion of your project in app level Gradle file.
Then check whether you have installed that sdk version. You can check it on AVD manager.
If you haven't buildToolsVersion sdk installed then install first and rebuild the project.
Ex. If your buildToolsVersion is 28 , you should install Android 9.0(Pie) - API Level 28 SDK.
Turn on Internet and open android studio in that select "Tools->sdk manager" and select api level 29, download and apply it.
Close android studio and open again 💯✨

No Android SDK found - Android Studio

I have a problem with Android 0.4.2 Studio, when creating a new application, it tells me there is a problem with the rendering and shows me the following problem:
Renderering Problems
No Android SDK found. Please configure an Android SDK.
My setup SDK and JDK is this: Android SDK location: C:\adt-bundle-windows\sdk, I put the path I use in Eclipse SDK, or there may be the problem, if someone has happened and what has been fixed, I'd like to give me the solution, thank you very much.
I just encountered and solve a similar problem.
First you should check the directory like other threads described. Then you can check whether the Build tool version matches your SDK version.
(e.g. for my project, in build.gradle file, you have:)
android {
compileSdkVersion 21
buildToolsVersion "21.1.1" }
and then open you SDK manager, make sure you have the same version of sdk(21.1.1) installed in the selected directoriy:
If not, install it and restart Android Studio. It works for me.
I've also seen other guys saying run Android Studio as administrator would also help:
https://teamtreehouse.com/forum/i-am-getting-this-warning-message-rendering-problems-no-android-sdk-found-please-configure-an-android-sdk
I got the same "No Android SDK Found" error message... plus no rendering for Design window, no little cellphone screen.
My SDK path was correct, pointing to where the (downloaded during setup) SDK lives.
During Setup of the SDK Mgr, I didn't download the latest "preview edition (version 20)"...(I thought it better to use the next most recent version (19)) Later I found, there was no dropdown choice in the AVD Manager to pick Version 19, only the default value of the preview, 20.
I thought "Maybe the rendering was based on a version that wasn't present yet." So, I downloaded all the "preview edition's (version 20)" SDK Platform (2) and system images (4)...
Once download/install completed,
RESTARTED Android Studio and Viola! success... error message gone, rendering ok.
From the File menu, choose Project Structure (if you're running 0.4.4 there's a bug and the menu item doesn't have a title, but it still works), and choose the Android SDK item. You should see something like this where you can set up your JDK and SDK.
After setting it, quit Android Studio and relaunch it for good measure.
i have just discovered, android studio 3.0.1 has no sdk during the installation. because during the installation, it doesn't give sdk as part of install able unlike in recent versions of android studio.
Don't worry just change the
build.gradle
ext.kotlin_version = '1.2.41'
to previous version.
It worked for me hope it works for you too.
Happy coding.
According to the Android Studio download page, the SDK comes bundled with Android Studio. It has its own copy when you install Android Studio.
ADT is a plugin for Eclipse. Try reading through that webpage to see if there is something that got missed when installing.
Here is the wording from the site, regarding ADT:
Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging.
I wanted to share a part of the issue I had because it is the first google result.
I installed Android Studio, when I tried to install my first SDK from the SDK Management windows I got the error that I didn't have any SDK installed.
I tried to look on the internet to manually download the .zip,manualy create the folder, no luck what so ever.
When I tried to run the Android Studio as an administrator it detected I didn't have any SDK and prompt me right away at startup to download a SDK.
Do following steps
a) Change minSdkVersion and sync gradle
b) Revert back your minSdkVersion and sync gradle again
It will be resolved.
These days, Android Studio setup do not provide SDK as the part of original package.
In the context of windows, when you start Android Studio 1.3.1, you see the error message saying no sdk found. You just have to proceed and provide the path where sdk can be downloaded. And you are done.
Here is the solution just copy your SDK Manager.exe file at the root folder of your android studio's installation, Sync your project and cheers... here is the link for details.
running Android Studio on Windows 7 fails, no Android SDK found
Try make New Project, and then choose same android version that you've installed sdk verions on "Target Android Device" dialog.
In my case, error message gone.
I had the same problem, Android Studio just could not identify the android-sdk folder. All I did was to uninstall and reinstall android studio, and this time it actually identified the folder. Hope it also works out for you.
Download android sdk through this sdk manager https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip
(note this link is for mac)
open android studio, click next, open where it ask to add path where u downloaded sdk..... add it... click next, it will downloaad updates..... and it done
Right now, the last version of Android Studio bundled (Windows IDE bundle with SDK (64-bit)) with Android SDK is version 2.3.3:
https://developer.android.com/studio/archive.html#android-studio-2-3-3
which size is about 2GB.
You can use it and then upgrade to the latest version of Android Studio.
I am on Mac Os. In my case, my host file was black. I added following entries (these entries should be there by default, but they weren't).
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
After re-running android studio, it prompted the sdk download.
I fixed this bug changing the proxy configuration:
No proxy → Auto-detect proxy settings

How to make project supported to the latest API, when it was created in lower API?

I receive an error from my already successfully runned project, when I import it in another eclipse on a different system.
The error i get is:
Can't resolve the target sdk"17"
What,ll I do to support that,s projects on sdkmanager that support API level-18?
Open the android SDK and download the SDK version 17. You may have to restart Eclipse or do a project -> clean to make it work correctly.
Or else, just right click the project, go to properties, and under the 'Android' option, you can view a list of the SDKs you currently have installed.

Android Studio - SDK is out of date or is missing templates

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

Missing annotations.jar

I am trying to update my Android SDK Tools to 17 rev. and I updated usign SDK Tools but in Properties/library ;
But the fact that in the support folder there is a annotations.jar already.
What should I do to fix it?
So, when i updated sdk to L version i had same problem. But after Extra folders updating in SDK Manager i didn't find annotation.jar file. Maybe Google bug with new SDK version. So i copied annotation.jar file from old SDK folder (folder half a year ago)
I had the same problem. I went to the SDK Manager within eclipse (Window --> Android SDK Manager) and installed the Android Support package which is found in the Extras folder. After the install the error was gone (at least in my system)
Right click onto your project, in context menu choose Properties, your will see a window.
Second line is Android - click onto it.
You will see list of installed SDK.
Check any SDK which has API level 16 or more.
annotationas.jar is embedded in SDK of 16 API level and after it.
What worked for me was downloading the annotations.jar file, and then adding that to where it was supposed to be according to the error.
It can be downloaded here: http://mvnrepository.com/artifact/com.google.android/annotations/4.1.1.4
After updating all of the packages in the SDK manager you may need to update Android Developer toolkit also. Eclipse -> Help -> Check Updates -> Install
I think Google has changed the location of that jar file from <SDK_DIR>/extras/android/support/annotations.jar to <SDK_DIR>/extras/android/support/annotations/android-support-annotations.jar
To solve this issue, I followed these steps on all projects and libraries in my workspace using this jar:
Just removed the file from Java Build Path -> Libray Tab,
then Add External Jars
Chose file from the given location above.
I had this issue just now, and this was the top result in Google. Posting my results for time-traveling Googlers from the future.
Jose's solution didn't work for me, as there was no "Extras" folder, nor "Android Support" package, in my update manager, so things must have changed within the past two years.
Here's what did work for me: update all of the packages in the SDK manager. I don't know which update in particular fixed it, but now that they are all up-to-date, the problem is solved.

Categories

Resources