Unable to Add Google Cloud Messaging to Eclipse - android

I am trying to add the Google Cloud Messaging library to my project in Eclipse (Android Developer Tools Bundle) but I am unable to locate the Google Cloud Messaging library in the Android SDK Manager.
I downloaded a new version of ADT, a few hours ago, checked for updates, it was already the latest version.
Please help me in adding this library as I need GCM for my project.

First of all make sure you have imported the google play services into your workspace.
Go to File -> Import
Browse to YOUR_SDK_PATH/extras/google/google_play_services/libproject/google-play-services_lib and hit OK.
Check the Copy projects into workspace checkbox and hit Finish.
After this is done,
Right click on your project and go to Properties -> Android
In the libraries section hit the add button and select google-play-services_lib from the selection box.
Check the Is Library check box and hit Apply and OK.
Hope this fixes it.

Related

Facebook SDK 4.8.2 import in ECLIPSE

How to import facebook sdk 4.8.2 in eclipse. I am unable to import as facebook folder contains aar file when we directly download developer site. And from git , unable to get src files of facebook
Here you have an answer from Android Facebook SDK 4 in Eclipse
I also have faced this problem, so I will write a short guide, how to
install it in Eclipse.
Step 1. Import to Eclipse First of all, download the latest
version of SDK (on current moment it is 4.0). Unzip it to a
folder.
Open Eclipse, click the right mouse button in "PackageExplorer" and
choose "Import". After that, go to "Android" -> "Existing Android
Code Into Workspace".
Now click "Browse" and choose unzipped SDK folder, and deselect all
other found projects, except from the "facebook" (it is an SDK).
Other included projects are just samples, and you don't need them now.
You may select "copy project to workspace" checkbox, if you need this.
Step 2. Fixing errors After importing, we will see, that the
whole facebook SDK package are in errors:
But if we look closer, and open one of marked as error classes, we
will find, that SDK tried to importsupport.v4 library:
It required for properly compilation. You can find instructions how to
download it using Android SDK Managerhere.
After it downloading, you can find it in your Android sdk folder:
<sdk>/extras/android/support/v4. Then add it to the facebook SDK
project: right mouse click on SDK project -> "Properties" -> "Java
Build Path" -> "Libraries" -> "Add External JARs", and choose
android-support-v4.jar from it's folder.
After that a lot of errors will be gone:
But, there are other errors. So we are going to another class, and
found it error code piece. Move mouse pointer on it, and Eclipse will
show you the hint, of what kind of error you are facing. It says that
your compliance Java must be version 1.7. Allow Eclipse do it by
clicking "Change project ...", or do it manually by going to
"Properties" -> "Java Complier" -> "Compiler compilance level"
-> "1.7".
OR
Moving ahead. Now we are facing only one kind of error, that says that
the FB SDK can't find required Bolts Android library.
We are going to google, found it compiled jar in a repository.
Choose the latest version (for current moment it's 1.2.0, but SDK
gradle file is using 1.1.4, so you may choose that), and download the
jar. Now add it to the facebook SDK as external lib, as we do it
before.
Voila! Ther are no errors anymore!
Also don't forget to set in the facebook SDK project "Properties" ->
"Android", that it is a Library.
Just for ensurance, close/re-open the SDK project and clean it
("Eclipse menu" -> "Project" -> "Clean"), so all files can build
properly.
Step 3. Add it to the Android project Now you can try to add
it to your Android app. Go to your Android app project "Properties"
-> "Android" -> "Library" -> "Add", and choose facebook SDK.
Follow official tutorial, and set up your Android application
project (don't forget to add all required elements to Manifest.xml).
Than you can use this tutorial to add LoginButton to your
Activity. Try to build it. It should run without problem.
This also might be helpful, if you find any issue: Facebook SDK v.4 for Android: errors on Eclipse
Check also: Android Facebook SDK configuration on Eclipse
Hope it help
EDIT: As you would see in the comments below, this answer is not already corrected. The best way to deal with this problem is export project from Eclipse to Android Studio, which doesn't have this issue and becoming the first Android Developer tool, where Eclipse seems to be as was said on Android Dev Summit 2015 truly deprecated.
Thank you so much! I'm still procrastinating migrating from Eclipse to Android Studio. And I found that the last version that works with Eclipse would be Facebook Android SDK 4.5.1. Download link here: https://origincache.facebook.com/developers/resources/?id=facebook-android-sdk-4.5.1.zip
Following this instructions make it work!

Android import google play service in eclipse error

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.

Google play services induces errors in my project

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..

error when import google play services lib

I follow the instruction here https://developer.android.com/google/play-services/setup.html
The project lib is now appear in my eclipse but I have error :
What could be the problem?
I had a lot of problems with importing google play services library. Here is what I did...
Delete the library, on your eclipse AND on your computer.
Download a fresh, up to date revision of google play services library and save it in your preferred directory.
Go to your eclipse, file, import, existing code, navigate to the directory of the library, OK.
Now that the library is in your eclipse, right click your project (not the library, your app project) and click properties, under android, click add, click the library you just imported, click apply, and then you should be done.

android can't import google play services

From SDK Manager I have download the google play services, but when I try to add this lib to my project from right click then import the existing android code into workshop then when I select the google play services lib from C:\Program Files (x86)\Android\android-sdk\extras\google\google_play_services\libproject\google-play-services_lib I got this error (see the pic below please) .
note
I have android support v4 (maybe this makes problems? I just tell you because I don't know if this would make mistakes).
Seems to be you have already imported the google-play-services_lib project and just deleted from eclipse ide but not in your hard drive workspace folder. Try deleting the google-play-services_lib project from your workspace folder and try importing the project again.
And make sure "Is Library" is checked in properties->Android of google-play-services_lib project.
The Maps APIs for Android have been updated in the latest release of the Google Play Services library and have been rolled out to Android devices with the Play Store.
Please check this link.
if you have any query comment below.
Seems that library already installed check my step by step tutorial to see if how you missed some step in using google map android v2 on emulator(android 4.2.2) have a look at to my blog: http://umut.tekguc.info/en/content/google-android-map-v2-step-step

Categories

Resources