Android Eclipse Support Library: Required version blank - android

I have just downloaded and installed the latest ADT Bundle for Windows available from the Android Developer website. Following this, I installed all the packages in the SDK Manager, including the 'Android Support Library Rev. 18'. Finally, I installed the latest ADT through the 'Help > Install New Software...' menu in Eclipse.
I have strictly followed the following guide to create my first project:
http://developer.android.com/training/basics/firstapp/creating-project.html
But by the last step, I arrive at an error, showing the Support Library revision I have installed, and a required version of -blank-:
http://i.stack.imgur.com/CScNj.png (sorry, I can't post images yet)
I have checked through 'Window > Preference' that Eclipse is pointing to the right SDK directory. Mine contains the directories: add-ons, build-tools, docs, extras, platforms, platform-tools, samples, sources, system-images, temp, tools - I assume this is correct.
I have read elsewhere about moving files from \extras\android\compatibility to \extras\android\support, however I do not have the 'compatibility' directory. Additionally, my support folder contains the folders: samples, v4, v7, v13 - if that means anything (I assume the problem lies somewhere in here). I have installed the packages in the Android SDK Manager with admin privileges, and have tried creating an android project in Eclipse with admin privileges too.
Not sure where to go from here. Has anyone else experienced this error and can point me in the right direction?

Actually this appears to be an actual bug in the SDK tools: https://code.google.com/p/android/issues/detail?id=60149
see #55 for a workaround without having to downgrade the SDK tools.

You may temporarily downgrade to previous version: just download http://dl-ssl.google.com/android/repository/tools_r22-windows.zip and extract it to your "..Android\android-sdk\tools" folder.
It solved the problem in my case.
UPDATE:
As #DogGuts suggested, a better way is to download correct templates from here and replace files in "\Android\android-sdk\tools\templates\activities"
And the best solution is update SDK to 22.2.1 version :)

Related

Installing Unity 4.6.1 error: No SDK found

Since installing Unity 4.6.1 I have been having an SDK version problem.
When I download the SDK all I get is the "tools, platforms, add-ons folders and AVD Manager.exe and SDK Manager.exe.
When I point Unity to this folder it still says no SDK found.
I tried copying these files and replacing the same ones in my SDK that did work.
How do I set the SDK file up?
Window-->Preferences-->Android-->
SDK Location: C:\CI\android-sdk-windows\tools-->then SDK Location: C:\CI\android-sdk-windows-->Apply-->
List show:
Target Name Vendor Platform API Level
Android 5.0.1 Andriod Open Source Project 5.0.1 21
Google APIs Google Inc. 5.0.1 21
-->OK
Point it to the root folder of Android SDK which you got after unzipping the bundle.
Also, see this: http://docs.unity3d.com/Manual/TroubleShootingAndroid.html
EDIT:
After seeing the edits to my post, I think it makes sense to put this info out here for better visibility.
Anyone with OP's problems, read this:
There's a zip available if you don't want the Android Studio bundle. Here: developer.android.com/sdk/index.html#Other
But you don't need to download the whole thing again and again. Just fire up the sdk manager, tick mark the packages you need to update (just select the core packages, exclude docs and samples and sources and emulator system images), accept their licenses, and just install.
Also, it is not necessary to update the Android SDK everytime Unity asks you to do so. Just hit in continue as many times as is required. Your build will continue.

cant find android sdk build-tools

When i create a new android application project in eclipse the gen - file is empty.
I found out I have to install android sdk build-tools but in the tools folder there's just the Android SDK tools and the android platform tools.
It's revision 22
You need to start the SDK Manager and download the build-tools from there.
You'll need to update the ADT (Android Development Tools) in Eclipse to the newest version first (see this post for more info on how to do this). What also worked for me was to get the Android API and all the extras updated before I could update the build-tools.
May be you can use ADT bundle (http://developer.android.com/sdk/index.html) and avoid the manual installing of SDK and eclipse plugins. All you need to do is to download it, unzip it and start using eclipse to create your apps.
I had the same concern.
You may be looking in the wrong sdk folder.
I had two on my machine. One from before I started using the ADT Bundle. when you open Eclipse sometimes it opens the SDK manager for the wrong SDK. Open it manually from the bundle you downloaded.
Hope this helps.
I hope that this will help you and others. I had downloaded the "build tools" myself and placed in "Android home". I even used some of the tools several times but could not link them to other tools listed under sdkmanager. After much searching, I found that;
deleting the old tools that I installed manually, and
re-installing the same package version of the tools using the sdkmanager
helped me. After this the tools showed up under the list of packages in the sdkmanager. I had not noticed that my "build tools" were not listed on sdkmanager before as I had installed them myself and barely used the manager.
If you don't want to go through this (reinstall) hassle, I noticed that the only difference between the auto install and manual is that sdkmanager kept the package version directory structure for the "build tools". For example, if you download version 4.0.5, then it will be in
<ANDROID-HOME>/build-tools/4.0.5/
whereas I had done away with this to keep the file path shorter. After this, all should be fine.
Note: this is like learning that white space matters in some languages and not others. You just have to follow the thing's rules. Also question is a duplicate of this one.

How to revert Android SDK Tools to an earlier revision?

Is it possible to revert Android SDK Tools to an earlier revision (for example from r17 to r16 or r15)?
Download the older tools, and delete the new ones and unpack the old ones and your done. Is nothing more to it than that.
The tools can be downloaded from the "android" program in the tools directory of you current sdk.
android-sdk-linux-17/tools$ ./android
#erbsman this is not possible to download old version of sdk tool from Android too. because it uses an xml file(check logs on ANDROID TOOL) to get location of all zip files. so you have to do some kind of hack for that. check out following link for hack
Download the Android SDK components for offline install
The problem you're having has to do with a change the Android team made to how lib jars are referenced.
Does this solve the problem? http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17

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.

How to downgrade my SDK Version?

I made a stupid mistake by upgrading my SDK version to r15 as the android repository was not loading. How do I revert back to my older version r10?
Or is sticking with the newer version better? I'll have to upgrade my ADT Plugin as well then.
Thanks a lot.
Anyway, for those who want to downgrade Android SDK Tools to a previous version, it can be possible following these steps:
Find your Android SDK folder
Locate the "tools" subfolder and rename it to "tools1" (just to keep a backup copy of the original tools folder)
Likewise, rename platform-tools to platform-tools1
Download from google repository the SDK Tool version you want to downgrade to (for instance: http://dl-ssl.google.com/android/repository/tools_r22.6.2-macosx.zip) and unpack it.
The ZIP file you downloaded contains a tools folder that has to be moved to your Android SDK folder.
Likewise, download the platform tools (for instance: http://dl-ssl.google.com/android/repository/platform-tools_r19.0.1-macosx.zip), and extract it in your SDK folder.
That's it.
I want to follow up on the great answer provided by Ariel Iriarte, step 3 (Download from google repository the SDK Tool version you want to downgrade to).
To find the old tools, you need to determine the SDK version number that you want to revert to. On the Google Android SDK webpage, you will find a Revisions list that shows all the SDK numbers, e.g.
SDK Tools, Revision 22.6.2 (March 2014)
SDK Tools, Revision 22.3 (October 2013)
etc.
Make a note of the exact revision number, like "22.3".
Now download the tools by using the following pattern:
http://dl-ssl.google.com/android/repository/tools_rXXX-windows.zip
http://dl-ssl.google.com/android/repository/tools_rXXX-linux.zip
http://dl-ssl.google.com/android/repository/tools_rXXX-macosx.zip
where you must replace XXX with the exact revision number noted above. For example, to download revision 22.0.5 for Mac OS X, download the file:
http://dl-ssl.google.com/android/repository/tools_r22.0.5-macosx.zip
Once you download the file and unzip it, you will find a single folder called 'tools'. Now follow the answer by Ariel Iriarte and replace your android-sdk/tools folder with this new one. This is the folder that contains stuff like:
NOTICE.txt
adb_has_moved.txt
android
ant
apps
ddms
dmtracedump
etc.
Some of you probably found this thread due to the unstable versions of Android-Tools pushed (exclusively) since the stable 22.3 version. This causes a 'hang' in the emulator on the "Android Animation / Splash Screen" in Intel API's pre Version 19, and a "floating point exception" for Intel API-19. The ARM versions still work, though more slowly on Intel machines using acceleration.
To answer the questions of "how to find the older versions not listed in the GUI" - or present in the current xml which feeds it (https://dl-ssl.google.com/android/repository/repository-8.xml), in the comments above, I have no idea how they can be located (please enlighten me).
Fortunately, someone reporting the bug did post a direct link to the Linux and Windows versions of the stable 22.3 version in this thread:
https://code.google.com/p/android/issues/detail?id=66786
... which are:
http://dl.google.com/android/android-sdk_r22.3-linux.tgz
http://dl.google.com/android/android-sdk_r22.3-windows.zip
These also exist in unofficial locations on the web, should those get pulled down, along with the now-gone references to them.
After extracting that archive, you will have the "Tools" folder you need to replace the broken one, as per Ariel Iriarte's instructions above (though I renamed the existing 'Tools' folder something involving the letter 'f' - days into this problem).
In order to prevent this problem from re-occuring, do NOT count on the built-in method in Eclipse / Android-SDK to revert to a previous installation, nor for the older-versions of any file provided by Google to be available At All, Ever, in the future. Backup your entire 'android-sdks' tree prior to installing anything.
You can install multiple SDKs, and set the default SDK by editing the properties on the Android project.
The simple solution is :
1- Go to your graddle-wrapper.properties then change this line as you desire :
distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip
2- Go to File>Project Structure>Project then Change both Gradle version and Gradle Plugin Version
3- then Sync your Project
Done.

Categories

Resources