I'm trying to code an app for android and I ran into a problem with the sdk manager. When I try to run it in eclipse, it says "Failed to run android sdk manager. Check the Android Console View for Details." Then in the console it says:
[2013-01-30 21:27:45 - SDK Manager] Missing %s file in Android SDK.
[2013-01-30 21:27:45 - SDK Manager] android.bat
I reinstalled eclipse, the sdk and tried everything any other posts about the same problem but nothing works.
I was able to restore the missing items in File | New... quite easily by performing the following steps:
Switch to the Java perspective, either via the perspective switcher
toolbar at the top right of the main Eclipse window, or via the
Window | Open Perspective menu item.
Reset the perspective by either right-clicking on the Java
perspective icon in the perspective switcher toolbar, or by clicking
Window | Reset Perspective...
As to why they weren't there in the first place, the most likely cause would be that the ADT contributes various things to the Java perspective, and these changes don't take effect until the perspective is reset after installing the ADT. As an Eclipse plug-in developer I learned it the hard way, that changes to perspectives don't get picked up unless you explicitly reset them.
Ensure that your SDK has the android.bat file. By looking in the directory the SDK is in.
Maybe you can try: chmod +x <ADTFolder>/sdk/tools/android
Unzip your sdk zip somewhere, copy entire contents of tools directory, replace it with your actual sdk tools folder contents.
Restart eclipse if needed.
Related
My Android Studio suddenly stopped recognizing JDK. it starts fine with no error messages.
I have JDK 1,7 (x86 version) on windows 8.1. Environment variable is defined in the system variables and I can run java -version command from cmd with no issue.
following screen shot describe the problem clearly:
You may need to check if both JDK and SDK are set correctly.
In the current project:
Go to File > Project Structure..
Explore the sections "Android SDK
Location" and "JDK Location" (Put the complete paths)
Click OK to save changes
For projects default:
Close current Project (File > Close project)
Click on Configure > Project Defaults > Project Structure
Explore the sections "Android SDK
Location" and "JDK Location" (Put the complete paths)
Click OK to save changes
Restart Android Studio and try again.
Screenshot: http://i.imgur.com/0OD8OeJ.png
(I cannot post images directly)
After spending one night trying to solve this problem, i just did as suggested by yole
So Simple :
File ----> Invalidate.
I had the same problem after upgrading to build tool 22.0.1.
I solved this issue by removing dependencies and adding it again like app-compact and play services.
How do I configure IntelliJ to access offline documentation (for both Java and Android if possible) without leaving my IDE? I'm using IntelliJ IDEA 13.1. My Android application is building and running fine so my installation seems to be correct. I've examined the relevant SO posts:
How to view JDK external documentation in IntelliJ IDEA?
JDK documentation in IntelliJ IDEA on Mac OS X)
IntelliJ and the android java docs
But either the paths they recommend are not on my machine (the posts are rather dated) or else too vague. Interestingly my /Library/Java/JavaVirtualMachines folder seems to be empty whether I use Finder or Terminal. My Documentation paths tab under the File | Project Structure menu item is empty.
I should add that I'm attempting to use the Shift+F1 keyboard command when I have a keyword highlighted. That's what is recommended, but nothing happens. Below are pics of my current documentation paths in the Project Structure dialog. All done according to recommendations as far as I can see, but maybe someone can spot something.
I think configuring the path to src.zip should be enough, IntelliJ will retrieve the Javadoc from the source files. In Modules Settings, in the SDKs panel choose your current SDK, go to the Sourcepath tab and make sure there's an entry for src.zip.
On OSX it's located under
/Library/Java/JavaVirtualMachines/jdk1.7.0_10.jdk/Contents/Home/src.zip
or
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home/src.zip
depending on which SDK you have and how you installed it.
For the Android doc, I guess you can do the same if they provide a zip containing all the source files.
Command + ; open Project Structure
on left panel select SDKs
in Sourcepath tab click +, select your src.zip
I installed (after unzipping) android-studio-ide-135.1224218-windows, hoping to be up and running a "hello world" program by now, but the IDE won't even start because "Your Android SDK is missing, out of date or missing templates." It tells me "You can configure your SDK via Configure | Project Defaults | Project Structure | SDKs" but when I do so, I see NOTHING in the text box for Android SDK location.
I searched for "android sdk" on my computer, and found C:\Program Files (x86)\Android\android-studio\plugins\android\lib\sdk-common.jar, but when I put that or C:\Program Files (x86)\Android\android-studio\plugins\android\lib into the text box, I get NO ERROR, but then I get the same message, and when I come back to the text box, IT DOESN'T HAVE WHAT I PUT INTO IT.
If I browse for the text box location, no matter what I put in, it says "Please choose a valid SDK directory".
That's the only "android sdk" on my computer.
I JUST installed Android Studio to C:\Program Files (x86)\Android\android-studio with no errors.
I have C:\Program Files\Java\jdk1.7.0_60 as JDK location. It won't let me change it to C:\Program Files (x86)\Java\jdk1.7.0_25.
I've Googled to see if I can download an android sdk from somewhere but found nothing.
WHAT DO I DO? I can't get into the IDE to try stuff.
sdk-common.jar is not the 'sdk' that Android Studio is looking for. You must download the sdk from SDK Manager and put it in the directory C:\Program Files (x86)\Android\android-studio\sdk.
This is what the sdk should contain:
sdk\build-tools
sdk\extras
sdk\platforms
sdk\platform-tools
...
I couldn't make use of the Answers above, so I uninstalled and then brute-force deleted EVERY trace of Android EVERYTHING.
Then I downloaded and installed installer_r23-windows.exe, putting the SDK manager out there BEFORE installing the Android Studio IDE. I allowed the default path: C:\Users\Dov\AppData\Local\Android\android-sdk.
Then I downloaded and installed android-studio-bundle-135.1245622-windows.exe--NOTE: BUNDLE, NOT IDE. I used the default folder: C:\Users\Dov\AppData\Local\Android\android-studio.
And I STILL got the SAME ERROR. But at least THIS time I could go into SDK Manager, as the error message said to do.
What I found was that the CORRECT path to the JDK, which was the same path shown in the SDK Manager dialog for installing packages. So why the error?
LOOOOOOONG story short... as I tried to browse for the path, I noticed that the AppData folder WAS NOT SHOWING.
SOLUTION: TYPE THE PATH BY HAND. It worked.
I CHANGED NOTHING, except my approach.
As it happens, "The [AppData] folder is hidden by default in File Explorer, and has three hidden sub-folders: Local, LocalLow, and Roaming." See here.
I assume that was Android Studio's problem, but why typing it by hand changed all that is anybody's guess.
I guess it's not a great idea to have AppData part of the DEFAULT install path.
(BTW, I did NOT have to mess with ANY environment variables.)
=== EDIT ===
I reinstalled Studio and SDK Manager and the above did not work. What I did BOTH times was to TRY to drag the SDK Manager.EXE file into the browse dialog from an Explorer window; it didn't work either time, but I tried today and THEN found success.... So I guess this seems to be a necessary step.... I also added \ after sdk in the text box for the SDK path.... And I clicked Apply before OK.... I hate when stuff works seemingly randomly.... Just trying to save others the frustration. Maybe Google needs to address this.
I had exactly this problem. After downloading Android Studio from the developer site:
android-studio-ide-135.1538390-windows.zip
But kept getting the error: "Your Android SDK is missing, out of date or missing templates."
Wasted several hours, but eventually went to the "Installing the Stand-alone SDK Tools" page:
https://developer.android.com/sdk/installing/index.html?pkg=tools
And downloaded and installed installer_r23.0.2-windows.exe.
Then I added its location to Configure -> Project Defaults -> Project Structure
I can now create projects.
I'm using the ADT of Eclipse, downloaded from the Android Dev site. Each time I install a plugin and restart ADT, the splash screen reverts back from this (The ADT splash) to http://www.stuermer-benjamin.de/v12_1/wp-content/uploads/2012/08/001_launch_eclipse_4.2_juno.jpg&w=905&h=">this (The vanilla Eclipse splash). After the application has loaded, the way I have my panels laid out reverts back to the default and the UI doesn't look like the regular Eclipse interface like this instead the elements are grey and boxy. The plugin then never works - when I try to perform an action that the plugin should handle I get an error message popup.
I've had this happen with any plugin I try to use (from the Help > Install new software... dialog). Each time I have had to delete and recreate my Eclipse program folder with a fresh download. Does anyone know what is going wrong and how I can fix this/install plugins correctly?
It's a bug and it's reported here: http://code.google.com/p/android/issues/detail?id=41126
Edit: It's solved: http://code.google.com/p/android/issues/detail?id=41126#c73
When I attempt to create a Android Project for the first time, I get an error saying "an SDK Target must be specified. I looked on the internet, and I couldn't find a fix to my problem. In the Android SDK manager, I have downloaded almost every available package, and none of htem fixed my problem.
At the console window at the bottom of eclipse, I get these errors:
[2011-04-11 20:09:57 - SDK Manager] Warning: Ignoring platform 'android-11': android.jar is missing.
[2011-04-11 20:22:22 - com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper] Unable to read C:\Program Files (x86)\Android\android-sdk\AndroidManifest.xml: java.io.FileNotFoundException: C:\Program Files (x86)\Android\android-sdk\AndroidManifest.xml (The system cannot find the file specified)
Did something not install correctly?
Thanks
If you open up the preferences in Eclipse and select "Android" from the left-side menu, do you see an "SDK location" listed? You'll want to make sure that that points to the folder where you downloaded the various SDK packages.
In the Preferences window, select Android in the menu on the left. On the
right side of the window, click Browse, find the location of the Android SDK on your
hard drive, and enter it in the SDK Location field. Eclipse needs this information to be
able to access all the tools that are supplied with Android, such as the emulator.
while starting a new project, dont forget to select the build of the android OS you will be using.
Best luck.