Problem with Android project - java

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.

Related

How can I restore my Android Studio project?

I changed the name of the Android Studio project folder in the Windows Explorer before I started Android Studio. Bad idea.
Now I get the error:
Gradle sync failed: No toolchains found in the NDK toolchains folder for ABI with prefix: mipsel-linux-android
And all my Activity files are replaced with one MainActivty that doesn't contains the things I've made.
Unfortunately I can't get a previous version with "show history" in Android Studio and i can,t get an older version via windows explorer "restore previous version"
I also tried to decompile it from the .apk on my phone. I got the layout and xml files but can't find my java classes.
I worked since weeks on this project and don't want to lose it.
Can anyone help me either fix the error or restore the .apk?
Thanks so much for all suggestions and ideas
First close the broken project this can be done with File > Close project
Then you have to reopen the project from the new location ie. the renamed folder.
File > Open... browse in your filesystem for the project, select the folder and press OK
Wait for the gradle to sync and hopefully you won't have any problems!
I have the same problem when updating ndk-18. You updated the NDK to version 18 and it is missing the folders/files. You can download ndk-v17 manually and extract the search folder "toolchains" to copy the missing folders/files to your folder android-sdk/ndk-bundle.
From github.

Installed Android Studio 0.8.1 but can't get into IDE since no Android SDK

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.

Android SDK Eclipse AndroidManifest.xml not created

I've downloaded the ADT Kit from the Android Developer Website, but if I try to create a new Project (New-> Android Application Project), the Manifest file is not created. In the console window, I get the message:
'[2013-12-13 15:50:08 - package name] AndroidManifest.xml file missing!'
How can I solve the problem?
I already tried to clean the Project and run again, but the xml file isn't created. I tried also to uninstall (delete) the SDK and download it again, but there is the same mistake.
I found the solution:
First, I Updated my SDK, but it wasnt the problem. The problem was the character 'ö' in the project / package name. Eclipse didn't create the Manifest because of him.
It's a German App...
To fix this problem, right click the project or edited resource and select “Refresh”.
If you edit outside of Eclipse a lot, you can enable auto-refresh by going to Window->Preferences menu, then in the Preferences dialog box, select General > Workspace.
Check the “Refresh automatically” box.
and even in the eclipse in the top menu bar you can find search-->check the automatically build

eclipse throws AndroidManifest.xml file missing deployment error, though the file exist

I'm using eclipse android IDE (bundle)
a strange thing,
I have build my android application successfully (no errors)
it includes android Apllication project and a native c code project.
I try to run the android project on my android-device
and get this error:
Description Resource Path Location Type
AndroidManifest.xml file missing! WazeAndroid Unknown Android Packaging Problem
Although I see it in the package tree.
I have googled. tried t restart eclipse and my Mac
nothing helped.
Go to Project in menu and do Clean your project which one you selecting then run your program.
Here is a google offical solution
To fix this problem, simply delete the debug.keystore file. The default storage location for AVDs is in ~/.android/avd on OS X and Linux, in C:\Documents and Settings\.android\ on Windows XP, and in C:\Users\.android\ on Windows Vista.
The next time you build, the build tools will regenerate a new keystore and debug key.
I hope that this can help you.

Failed to run android sdk manager in Eclipse

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.

Categories

Resources