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.
Related
i installed the following plugin to my cordova project to receive push-notifications (and followed the given steps):
github.com/phonegap/phonegap-plugin-push
I also installed all needed resources by the sdk manager (extras-> google play services, support repository+libraries etc.)
But unfortunately i get an error in eclipse:
The packages com.google.android.gms.gcm, com.google.android.gms.iid, android.support.v4.app are missing somehow.. (or cannot be resolved)
i don´t know what i´m doing wrong..
is there any step-by-step tutorial for implementing the push-plugin in a cordova 5 app?
or is there any solution to this?
thanks!!
Screenshots:
http://abload.de/img/unbenannt-11qbf4.jpg
and
http://abload.de/img/unbenannt-2i7ozz.jpg
May be it would help you.
It is asking to add v4 support.
Try this:
Right click on you project in eclipse
Then select "java build path"
Click on "libraries tab" then click on "Add external jar file"
now you will get this v4 jar file in C:\Users[username]\AppData\Local\Android\sdk\extras\android\support\v4
NOTE : if you cant find the AppData folder then make sure to change hidden
settings.
Recommended to start using IDE Andriod Studio for Phonegap to prevent further issues. Android SDK has changed to suit Andriod Studio. I have build a clean project and paste over the index.html in Andriod Studio. No errors at all and gradle will help build all the projects file with 1 click!
I am in the process of migrating my current project from eclipse to studio which is present on github.
My project makes use of google play services lib and an another library (calendar lib to be precise)
I tried many ways of migrating to studio following the tutorials on the net but I am not able to achieve it.
I am getting problem with my Google play service library. The error is cannot find resource #integer/google_play_services_version
At this point of time I confused don't know Wat to do. Can some please tell me proper way of migrating.
It will be of great help. Thanks in advance :)
You are seeing the error in Android Studio? This should not be the case, as Android studio handles libraries through gradle dependancies. You can check your build.gradle for the dependencies. If you are seeing this error, I assume it is in Eclipse, which the link #SurajPalwe13 provided should help fix.
Migrating from Eclipse to Android Studio should be as easy as Importing the Eclipse project into Android Studio.
In Android Studio, File > Import > Select Eclipse project directory. Then a import wizard should come up.
Alternatively, you can export your Eclipse Project to contain gradle files:
In the latest version of Eclipse, Right Click Project > Export > Android > Gradle. Then follow through the export wizard. You should then be able to import the build.gradle file in Android Studio.
I am trying to add a Google+ sign in button in my app so that I can use the youtube API and provide an easy access to the user. However recently I updated my sdk and now on importing the google-play-services_lib in my workspace and further integrating the services in my project using the standard importing procedure (Project --> properties --> Android | add library) results in an red exclamation mark on my project and when I try to run it gives me a dialog which says there are errors in the project)
In Java build part I get an error which can be properly explained by the following screen shot:
How to resolve this issue? I am sure of the path.
Delete play services library from sdk (.../sdk/extras/google location )
Open SDK Manager and re-install play services library. Restart SDK Manager again to take effect.
Go to eclipse--> re-import play-services library from sdk (copy into workspace is optional).
Clean library project by project-->clean option
Go to your project, add this latest imported library to it.
Clean both library project and your project.
This should work..
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"
Today I updated Android SDK components to the newest version and somehow the whole com.google.android.gms package is gone. Instead, there is only com.google.android.maps with different classes than those in gms package. Is it a big change form Google or have I done something wrong? I have been using GoogleMap and LatLng classes to work with google maps and now I have just errors in my project.
Is it a big change form Google or have I done something wrong?
com.google.android.gms comes from the Play Services SDK, which you attach to your application project as an Android library project. Please check your environment to ensure that you have a valid copy of the Play Services library project and that your application project still points to it.
First off, if you did not run any updates with Android SDK Manager make sure the google-play-services-lib' project is open in eclipse. If this doesn't fix your problem then proceed. Note: eclipse(v22.0.1-685705) will close google-play-services-lib project with a 'close unrelated projects' command. The google-play-services-lib project must be open.
I figured this problem out. Initially, you/I installed Google Play services in eclipse directly from the SDK Path, (SDK Path is displayed on the top left of Android SDK Manager). When you updated Google Play services with the Android SDK Manager it deleted the .project file and now eclipse can't find the 'google-play-services-lib' project and your development project fails to compile. :-(
Solution:
The basic ideal of this solution is to clean out the old 'google-play-services-lib' project in eclipse, which is now defunct and install a new one with the project copied from the SDK path.
Delete the old project:
In eclipse delete any 'google-play-services-lib' project. (In Eclipse see: Project properties-> Android -> Library.)
In In Eclipse see: Project properties-> Android -> Library delete the old entry for 'google-play-services-lib' project. This will most likely have an red 'X' on it.
Install a new one:
Follow the instruction from Google to install 'google-play-services-lib' project. These instruction specify to copy the project out of the SDK install folder; and then how to set up the projects.
http://developer.android.com/google/play-services/setup.html
Notes:
Your name for 'google-play-services-lib' may be different.
The key to remember is that Google play services is not a jar file. It is a project in eclipse. Your, development project references the google-play-services-lib project.
By copying the project folder from the SDK path to another location, this will keep the Android SDK Manager from deleting your eclipse .project file, and causing this problem. The draw back is if you would like to update google play services, you have to remember to do all the steps again.
You will need Google Play Services sdk. You can install it from Android SDK Manager, if you are using sdk for eclipse.
After installing Google Play services, you can import the library project in your Workspace from ..\sdk\extras\google\google_play_services folder. Clean and build it.
Now you can go to the properties of project having problem and select the library project in Android section.
This should work!
Currently library is in Google Repository. To enable it make sure you have downloaded it using Android SDK Manager (down to the very bottom of the list).
For android create project [...] ant CLI-based project
Similar to: How to correctly include the support library in non-Eclipse Android application
The best I could find was https://stackoverflow.com/a/30689979/895245:
copy paste android-sdk/extras/google/google_play_services/libproject/google-play-services_lib directory in the project directory
cd into it and run android update project -p . -t android-22
add <property name="android.library.reference.1" value="./google-play-services_lib"/> to your build.xml.
You can install extras with the android GUI tool, or with this CLI method: Downloading the Android support library from command line
If you just copy paste the .jar in <sdk>/extras/google/google_play_services/libproject/google-play-services_lib/libs/google-play-services.jar under the libs/ directory of the project, it compiles but breaks at runtime because of the required res/values/version.xml which is not included in the .jar.
If using Android Studio you can add the Google Play Services to use the Google Android Maps v2 by adding a dependency to the build.gradle file.
dependencies {
compile 'com.google.android.gms:play-services:3.1.36'
}