Am trying to import google-play-service library in my workspace for developing google map application.
i follow these steps,
In sdk manager i downloaded playstore lib
I checked in android-sdk\extras\google\google_play_services\libproject\google-play-services_lib and also found library file
while importing i am getting error message that no project to import
i tried clean the workspace, restart the workspace also.
i am using API 21, System config 64-bit
I search a lot for same problem but I cant get a proper solution. i dont know where i am wrong. please help me where i am wrong. Thank you
one possibility are there
this message arise when your project already imported
so try it to create new work-space and then import it will be imported.
Related
I am new at android programming, I am using ADT Bundle (Android Developer Tools, "eclipse+plugin SDK"), I wanted to use google maps, so I installed google_play_services from SDK manager, and when I added this line to my code
import com.google.android.gms.maps.GoogleMap;
the next error appeared
The import "com.google" cannot be resolved
I have already looked in the internet, and I found some propositions that didn't work, and others for the older versions of SDK (<=2013).
It talks about .jar file of google_play_services (to import it to the library) in /extras/google/google_play_services/libproject/google-play-services_lib/
that doesn't exist (libproject/google-play-services_lib/) in the SDK folder that I have, and I can't either find the .jar file.
If you have a solution, I'll really appreciate your help!
Best Regards, Maya
You cant add play lib as jar, you need to add lib as project
import google-play-services_lib from android SDK support folder as an existing Android project (check "Copy projects into workspace")
clean newly added google-play-services_lib project
Right click on your project select properties and add library project to it
Make sure play lib and project using same Andrid version and then clean your project
For more detail about steps to import play lib see
Importing google-play-service library showing a red X next to this reference android
Hey :) I am trying to add the BaseGameUtils library to my workspace, I am using this guide: https://developers.google.com/games/services/android/init , I have downloaded from here :https://developers.google.com/games/services/downloads/ The BaseGameUtils sample but when I am trying to import it using Eclipse it gives me so many wrong things like Main,MainActivity and not the real BaseGameUtils, what is wrong here?
You need to run "make_eclipse_compat" script, located at Scripts/make_eclipse_compat in order to be able to import all of these projects using eclipse (they are created to use by Android-Studio by default).
Once you have run the script, a new folder called "eclipse_compat" will be created. You need to import the projects located at THAT folder. So, import BaseGameUtils, mark it as library and add a google_play_services as a library dependence.
Hope it helps
I am trying to import the google-play-services_lib into Eclipse but I am not able to import it as I am getting the following warning no projects are found to import. Can anyone suggest a solution to this? Please give step by step instructions as I am a newbie.
You can import android project in two ways,
In your case I suggest you to use 2nd way.
Note, the Android project which doesnt contain .class file, .project file can be import using 2nd option. In all other cases 1st option is better.
Delete project (google_play_services) from SDK Manager then reinstall project (google_play_services) and import.
You should choose option to 'Create project from existing source' from File->New->Android Project
I am trying to use GoogleMap V2 .But i am getting error on import these :
import android.support.v7.app.MediaRouteActionProvider;
import android.support.v7.media.MediaRouteSelector;
import android.support.v7.media.MediaRouter;
import android.support.v7.media.MediaRouter.RouteInfo;
And the error is
The import android.support.v7.app.MediaRouteActionProvider cannot be resolved
Here is the screen shot of the library that i have added
What i have to do .I have tried to import android\support\v7 By Build path .But it is not resolving my issue in there any way so that i can resolve these errors.
It looks like you have added gridlayout.jar to the projects lib folder.
Its a library project with resources. You need to reference the library project in your android projet
This library is located in the <sdk>/extras/android/support/v7/gridlayout/ directory after you download the Android Support Libraries.
Follow Adding libraries with resources
http://developer.android.com/tools/support-library/setup.html#libs-with-res
had the same problem and found that the link in my project to the appcomcat_v7 project is broken (right-click project and choose properties, then head to the Android tab)...
i removed and then added the correct project and i was good to go...
These type of Errors generally occurs when we accidentally close these libraries(by close unrelated projects,etc) which are automatically generated In Project Explorer of Eclipse like:
appcompat_v7
appcompat_v7_2
appcompat_v7_3
appcompat_v7_4
appcompat_v7_5
appcompat_v7_6
appcompat_v7_7
appcompat_v7_8
appcompat_v7_9
appcompat_v7_10
appcompat_v7_11
appcompat_v7_12
appcompat_v7_13
appcompat_v7_14
As soon as I open these files,all the errors in my app were vanished !
If It till then didn't work then do Project -> Properties -> Android -> Is Library -> Add.. -> And add appcompat_v7_*
I had a very similar problem to this after I had used force to close Eclipse.
When I then restarted Eclipse, I noticed a number of "appcompat_v7..." folders in my workspace directory. I deleted these - and maybe that was the cause of this problem.
But I resolved it by creating a new Test project in Eclipse, then restarting Eclipse to find all my projects compiled again! :)
I didn't need to change any project properties.
this solution worked for me:
The support library android-support-v4.jar cause this conflictand you see the error: The import android.support.v7.app.MediaRouteActionProvider cannot be resolved, just delete the library under /libs folder of your project, because the library is already contained in the library appcompat_v7, clean and build your project, and your project will work like a charm!
I've done an application which displays a Google map referring this tutorial
http://www.vogella.com/articles/AndroidGoogleMaps/article.html
The application has worked fine and it displayed a Google Map as shown in the tutorial. But now, when I open the project, it shows several errors relating to the import of com.google packages. I've already added the google_play_services_lib. But now, that is not shown in the application. When I try to import the google_play_services_lib again, this error appears,
"Cannot import google-play-services_lib because the project name is in
use"
What is the problem? Please help me.
This generally occurs, if you have a project or folder by the same name existing in your workspace.
In general, You can solve it by changing the name of the existing folder using 'F2' shortcut key. But, since this is a library I recommend you to shift the existing folder "google_play_services_lib" from your workspace directory to somewhere else and then again try and import the "google_play_services_lib" .
this means that google-playservices.lib is using by another projects, you can solve it by.
remove the reference to it from the project which is using it.
OR close that project using eclipse->right click->close.
Remove this project from your workspace then import from your sdk place.
[http://developer.android.com/google/play-services/setup.html#Install]
It seems that when you import google-play-services_lib, Eclipse creates a project by the same name. Even though I deleted manually the google-play-services_lib folder from my workspace folder, I also had to delete the google-play-services_lib project in Eclipse as well. After doing it, I was able to import the lib, and then use it in my project.