I've been having a terrible time trying to get a simple Map to appear in an app as shown on the Google Maps v2 documentation. Eclipse keeps saying:
The container 'Android Dependencies' references non existing library 'X:\Android Development\workspace\google-play-services_lib\bin\google-play-services_lib.jar'
I found a couple people on here that had the problem and I followed those steps with no luck. I have Google Play Services installed and I even uninstalled and reinstalled it. I have imported google-play-services_lib project into Eclipse and checked move to workspace.
Any help would be amazing as I cannot get this to work. I did check in the location and there isn't a file there, so I don't know why it is missing since I have installed Google Play Services.
This answer worked for me https://stackoverflow.com/a/16398399/1874332
I met this issue as well.
My solution is,
clean project google-play-services_lib firstly then clean my project
which depends on play service library
I fixed this issue by:
Right click "google-play-services_lib" project, select "Properties".
Click "Android" on left panel.
Check a version of Android SDK on "Project Build Target", then select "OK" button.
Rebuild google-play_services_lib project, now you have "google-play-services_lib.jar" in "bin" folder.
Clean and rebuild your project.
Details: google-play-services_lib project's original build target is android-10. If you do not install this version of Android SDK in Eclipse, Eclipse just don't build it, leaving an empty bin folder. And our project reference to a .jar file in this bin folder, which results in the error message. So to fix this issue is just to check an appropriate build target for google-play-services_lib project.
In Eclipse open Project -> Properties.
Select Android on left.
Check on the bottom that you have a reference to Google play services with a green checkmark. If not, click Add and add the google play services library
I fonund my answer. I hope this helps someone.
I've installed several versions of Android Build Tools. (17, 18, 18.1, 19).
I read other questions and answers. Someone pointed Build Tools.
So, I went to the SDK manager and I removed all Build Tools but not latest. (19)
Clean google-play-servies. And re-build.
Clean my project. And re-build.
Voila~! Thanks all~! I'm very happy!!
I've tried everything but nothing works for me even Google sample projects, at last I've updated all the packages in sdk and eclipse ADT plugin to ADT 14, then it works fine :-)
I solved this by right clicking the google-play-services_lib and building the project.
I 'deleted' it from the workspace and then re-added it, to make sure when I wasn't altering settings / hadn't changed anything important. This built successfully.
I then built my main application and it worked successfully.
I was getting strange path errors and android-9 resolution errors. But it seems to be working now.
My solution is,
clean project google-play-services_lib firstly
then clean my project which depends on play service library
I simply re-imported google play services library project and it worked!
I had the same problem. In order to fix this, you must ensure that your project supports same version of android sdk that is specified in the google-play-services-lib.
So, in my case, I have project that has Minimum Required SDK set to API15. So, once you have imported google-play-services-lib into your project following these steps here https://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject, make sure you open you see the google-play-services-lib in your Package Explorer in Eclipse. Expand it, right-click on it and select Properties. In the Project Build Target, make sure you check an SDK that is at least equal to Minimum Required SDK set in your project, in my case API15:
I was facing the same issue and got it solved when I updated my eclipse Android SDK tools.
I was using version 22 and when I updated Android SDK tools to 22.0.1 the error vanished and I could build my project.
I hope this helps someone...
First of all right click on the Project and import google-play-services if exist otherwise follow the steps told by #yoah (import it under sdk->extra->google->google-play-service-libproject->google-play-services_lib) and if still the problem doesn't solve then there may be multiple problems with multiple solution..
Solutions.
Restart eclipse
Clean the Project
upgrade google-play-services
Installing the new Build Tools did the trick. They were not
automatically included when I updated the SDK
If you have import the code . Be quiet sure to copy it to work space
otherwise this error may occur.
In Eclipse. Right click on your project -> "Android Tools" -> "Fix Project Properties"
Related
i try to add google play service in my app( i mean Google map) i added play service in sdk manager and i imported library in eclipse but i library contains errors.in eclipse has error
and also in console i have like this message
"google-play-services_lib] Unable to resolve target 'android-9'"
but i downloaded and installed
Android API version from adt 9
java build Path > Android Dependencies.how i can solve this problem ? what is a solution if anyone knows solution help me
P.S
i 'm new user in this site
welcome
this is a result
Right click on google-play-services_lib projects and select properties and change the target od project
Make sure you have project.properties in the project. It's needed by eclipse.
If you don't have it, kindly copy it from another existing android project, clean and rebuild your project.
Clean your google-play-services_lib project. Check the property of your library project which may have error in java build path. You have to tick the google-play-service.jar in Order and Export tab.
I updated the SDK Tools to R22 and the ADT Plugin as well. Everything worked well before the update but since then, I have problems.
Basically I have 2 library projects and an app project. One of my library projects contains some jar files in the "libs" folder. One of these jars is used in the app project itself for some initial setup. Before the update, everything worked fine, but now it asks me to add the jar to the build path and even if I do so, when running the app it still gives me ClassNotFoundException.
Did anyone had some similar experience or has any idea about what causes this and how can it be fixed?
Thanks.
Check this Android Sdk tools Revision 22 issue?. "I found that I needed to check all of the boxes in the order/export tab of the Java Build Path for the project - and each library -- to properly compile and run the app on a device." - should helps.
The workaround here worked for me
OK. I also had a Simillar kind of Problem.
Like say If you have library project as google-play-services_lib before updating than might happen that your library code has been also updated after updating your SDK.
You Should Remove that library project from your Workspace and Import
again from the source
folder like in my case i had to import from /android-sdk-linux/extras/google/google_play_services/libproject/google-play-services_lib. Add reference of
your library path to you android app project. clean and build your Project.
Hope this Helps.
you should try to upgrade eclipse.
1) Get the new imports via the Android SDK Manager
2) Check for updates in the Eclipse repository: help/check for updates
That would "for real" upgrade the SDK version in your configs.
Dunno if the other steps pointed by VShcryabets are needed, i had them before.
I am just starting to learn Libgdx, and am in the process of importing the 4 projects[desktop, main java game, android, html] into Eclipse Juno. I have not added any lines of code, just trying to get them to run on the different platforms.
It runs fine on the desktop version, but when I tried to run it in the Android emulator I get the error. Cannot find mygdxgame.apk!
I realized that my gen folder is completely empty, there is no R.java for the project. I have tried a number of things to make this work, but none of it is working. I am listing the things I have tried so far, and the hopefully the reason why I am asking this repeatedly asked question.
Project > Clean
Package Explorer [right click on my project] > Android Tools > Fix Project Issues
Deleted gen folder and Project > Clean
Restarted Eclipse
Deleted the project and Imported it again
Set Compiler Compliance Level to 1.6 for both main java game and Android project
Added a dummy XML to the android project and tried clean, and deleted it
Unchecked and rechecked Build Automatically
Checked my target-sdk in project.properties and made sure it is the same Project Properties -> Android and in my Manifest.xml
[Right click on project] > Properties > Java Build Path > Source tab, Removed mygdxgame/gen folder and then added it again
Made sure Project Properties > Android > Is Library is unchecked
Nothing has worked so far. My gen folder is still empty and I am unable to run the Android project because of the same error. Cannot find mygdxgame.apk!
What else can I do to fix this? In case this is answered I would appreciate someone giving me a link to the solution, as I have been pouring through SO and Google in general for nearly 2 hours now, with no success.
Regs
What happened to me a few days ago:
1.- I got the SDK Tools 22 update and I installed it, no other update appeared in my sdk manager... so I closed it.
2.- Then I got that "NO APK" error and tried every answer I could find.
3.- I opened SDK manager again, and I noted SDK Platform Tools also got an update and there was a new one: SDK Build Tools. Both of them didn't show up when I first updated the SDK Tools.. so.
ANSWER:
Open SDK Manager and check if your SDK Tools, SDK Platform Tools, SDK Build Tools are updated :)
On your build path, you should have a reference to the main project, under Projects tab of Java Build Path. Under Libraries, you should have gdx-backend-android.jar and gdx.jar along with Android not being a library.
Please check if Android is set as a library. If so, uncheck it. To do that, right click on the project and then select Properties. Choose Android on the left panel of the new window. Uncheck Is Library if checked.
Here's something might help-
Unable to run Android app, Could not find .apk issue in eclipse
I would take alook at your buildpath if all libs are correct. If it's a projekt from an other computer the libs are often at different places so you need to correct those manual. If they are not correct the android projekt do not generate your R. class and so on. So do rightclick on the core projekt -> Buidl Path -> Configure Build Path. Now take a look at the libs if all are there. I had the same issue with the android 15 apk so i need to add it manual. The clean or such do not fix such because eclipse can't know where you have all your libs.
If you really dont get it run i would recoment to use the setup ui of libgdx. It does noramlly handle all imports and so on for you. You can also use it to update your current projekt and so on.
Else i would read the guide for Manual Project Setup of Libgdx.
Libgdx setup Guide
I hope this does fix it.
I was working on an android tutorial and it wanted me to import the library from another project .The import worked and the project works correctly. But I noticed that doing that messed up several of my other projects (the ones that use Android 2.1) by apparently messing with the build path. Now instead of seeing "Google APIs [Android 2.1]" under the gen folder I see "Unable to get system library for project".
I verified the following:
I right-clicked the project and went to Properties I see that the correct Project Build Target is checked(Google APIs [Android 2.1]), but "Unable to get system library for project" is still shown above the assets folder and below gen and Android Dependencies. Cleaning all projects doesn't help.
How can I fix this problem?
is there a way to fix this issue globally or do I have to do it one by one?
I had the same problem. Try
Right click on your project
Go to properties
Click the Android section
Select a different target api (assuming one is already selected, as mine was - otherwise, select the one you want and jump to step 9)
Click OK
Do steps 1-3 again
Select your original target api
Click OK
Clean and build your project
Worked for me, anyway.
Derived the solution from:
"Unable to get system library for project" after I upgraded to Android SDK 2.3 and ADT 8.0
Error in .classpath on your project. It not connect to android sdk. Fix it and clean project. :-)
This happens when you are targetting an API version that for some reason is not mapped on your buildpath.
See which is the version of the SDK you are pointing to at the project.properties file.
Go to the SDK Manager at Window->Android SDK Manager
Check the Android API item that matches the version you want to use, OR, click on the latest one and then update your project.properties file.
Make sure your project build configuration is Project->"Build Automatically"
Retsart Eclipse (claning and rebuilding may not refresh all the project properties)
Borrowing from #Erhannis answer :
"
Right click on your project
Go to properties
Click the Android section
"
When I view the build target everything looked fine :
So I checked another build target , hit apply, and then re checked my original build target (Android 4.4.2) and re-hit apply. My project then compiled.
For me the project.properties file was missing (it was code from a repo I checked out). So I just created one with this line:
target=android-20
After that, Erhannis' solution worked for me.
Just for completing Erhannis answer: If you fixed the problem but it appears again when you restart Eclipse, then just go to the file local.properties on your workspace folder and verify that the location of the Android SDK there is correct.
At times, when only single Android SDK version is installed on your system, and if it gets changed either by un-installing / re-installing Eclipse, or otherwise (directly through SDK Manager), then this issue might crop up.
.
This is accompanied by the message like this on Eclipse console:
YourApp] Unable to resolve target 'android-22'
.
A simple workaround to this issue is:
Open AndroidManifests.xml of the project, and in the:
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="21" />
change the targetSdkVersion to the one currently installed on your system
Next, open the project.properties file and update
target=android-21
to your current SDK version
Finally, clean and re-build the project
Right Click on Project-> Select Android tools -> Select Fix Project Properties
This did the trick for me.
You need to click on the menu icon with the Android sitting in the grey box with a white arrow pointing down "Opens the Android SDK Manager".
or, from the command line, run:
%ANDROID_HOME%\tools\android sdk
Whenever i am trying to run my project, i am getting this error in the console.
"Could not find **.apk"
Operating system: windows XP
IDE: Eclipse SDK
Version: 3.4.2
Build id: M20090211-1700
Android: 1.6
ADT: ADT 10.0.0
FYI: it is only happening with a single project, other projects are running fine..
I think this can happen when you rename the library project out from underneath the dependent project. Eclipse is reasonably good about about updating dependencies in most cases but this one seems fragile.
First try removing and then re-adding your library in Project > Properties > Android > Library.
If that doesn't work try cleaning your projects, exiting Eclipse, and opening the ".classpath" file in your project's root directory. If you see a line that references your library project under a previous name, just delete it, save the file, and relaunch Eclipse. Build the library project and then your dependent one. You may need to re-add the library like I mentioned above. This is what worked for me at least.
Edit note: I also found some stale references in my .project files. They didn't seem to be causing any problems but I removed them too. If you do that, be sure to search for the old name in that file as there was a whole "link" section near the bottom that also referenced it.
Make sure after updating your android sdk sdk build tools are updated properly.
You can check it by Open sdk manager -"Android Sdk Build Tools" status must be installed.
if the status is not installed then install Android Sdk Build Tools for the same.
restart your eclipse and try again
check this it might be helpful to you
Make sure your project imported the Android 1.6 library correctly. That is, under your project, you should see 'Android 1.6', which expands and displays 'android.jar'.
If it says Referenced Libraries > android.jar, you will need to fix this by manually altering the .classpath for the project.
Open .classpath for the project and type the following:
The important line is the 3rd classpathentry, which is the actual link to the Android SDK libraries.
source
clean your project and check . eclipse is not building apk file.
check this thread. It might help you.
http://groups.google.com/group/android-developers/browse_thread/thread/2c3e45540b915945/f06e10bcda3ad68b?lnk=raot&pli=1
Run eclipse as administrator and then import your project
Update Android SDK, is what did it for me.
I was building a game with the LibGdx Framework and got the same error. I tried several solutions from various posts at stackoverflow and others.
Found help in a post at the LibGdx Forum:
http://www.badlogicgames.com/wordpress/?p=3010 Posted by Mario, on May 18, 2013
Just updated to ADT 22, so should you. However, the process wasn’t all that smooth. What you need to do:
Update the ADT plugin in Eclipse (Help -> Check for Updates)
Open the Android SDK Manager, either from within Eclipse, or from
your Android SDK folder
Fetch all the updates
Fetch all the updates again
Fetch the updates one more time…
The end result should be an updated ADT plugin, as well as up to date SDK packages. Make sure you have all three of the ones in the following image, with the exact version numbers.
I needed to update them only once and from there on it worked.
Even if this post is outdated I figured I'll share this, because I lost a day finding nothing.
I experienced that problem, too, when I created an android project that was using an android library. Obviously I didn't know how to incorporate a library into an application the right way. I wrongly used project dependencies (Java Build Path/projects) or adding a library (Java Build Path/Libraries). While all I had to do was go to the Android tab and import my android library by means of the add button from the Library section.
I am using PhoneGap and I checked several solutions about configuration (properties, build path). However, my problem was that I tried to run everything with the default setup for Eclipse. Then, I solved it going to the SDK manager to install: Android SDK Build-tools, and it worked.
Mine was caused by this problem (incompatibility between ADT and SDK), and was fixed thus:
Eclipse > Help
Install New Software
Add 'https://dl-ssl.google.com/android/eclipse/' to 'Work With'
section and press enter
After developer tools appears on the list, check it and click Next
Restart eclipse once download is finished
Make sure put correct SDK Location (I have 2 instances of SDK and update wrong once).