I have read all the post about this argument and I try all but i can't find a solution
I try to add to my app Google Cloud Messaging start follow the official google guide at http://developer.android.com/google/gcm/client.html
and
http://developer.android.com/google/play-services/setup.html#Setup
I install Playservices through Android SDK Manager and now I can't view the folder in android-sdk\extras\google\google_play_services
In Eclipse Kepler:
File -> Import -> Existing Android Code into Workspace
Root Directory:
....android-sdk\extras\google\google_play_services\libproject\google-play-services_lib
Copy project into workspace is selected.
Now i have play services library project in my workspace and listed in Package explorer and I can add reference to my project
My project -> Properties -> Android -> Library -> add... --> select google-play-services_lib -> ok -> Apply
In Java Build Path -> Order and Export I find:
.../gen ->selected
.../src ->selected
Android Private Libraries ->selected
Android 4.2.2 ->not selected
Android Dependencies ->selected
I continue the google guide "Implementing GCM Client"
Add lines to my manifest file and modify my onCreate and onresume like explained in "Check for Google Play Services APK"
All is ok and no compile error in eclipse.
When I try to run on emulator or on physical device (Galaxy S3 - Android 4.3) I have runtime error in logcat:
java.lang.NoClassDefFoundError: com.google.android.gms.common.GooglePlayServicesUtil
This is the code that have generate the error:
int resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
Seems that need library is not export in apk....
What I missing to do?
I had this same problem and what worked for me was changing the target for the google-play-services_lib project. To do that, right click on google-play-services_lib and choose "Properties". Next, at the top of the "Android" menu, under "Project Build Target", select the same target as the target of your main project.
I hope this helps.
Related
I've developed a Project that uses the android-beacon-library. I have imported the android-beacon-library folder as an existing project in the workspace and then I've done Project -> Properties -> Android -> Library -> Add, then selected the imported project. I have no problems using the library apis, but when I debug my app, Console says:
[2015-03-10 14:25:01 - android-beacon-library] Could not find android-beacon-library.apk!
And then it debugs my app without erros (apparently)... why it says me that it could not find the android-beacon-library.apk?
try importing the android -beaconlibrary file to to libs folder of your application
I am having the following error in my project. I have tried many solution but none worked for me. I am proviging the screenshots of project kindly help me in solving this problem.
Please Solve my this problem..
As the second screenshot suggests, the library for google play services (a .jar file) is missing. You need to delete that dependency, and add it by hand (I guess you imported this project from somewhere else). Make sure in your Android SDK manager you download the Google Play Services Library, then in eclipse you can import it by going to your Android SDK folder and import the jar file, the path should be like this ..\Android SDK\extras\google\google_play_services\libproject\google-play-services_lib\libs\google-play-services.jar
Update:
The error you are getting is not related to the library already, it's a different error, there is no size value for the AdView (missing or it was somewhere in the app inserted and the reference is missing).
I guess you talk about this app https://play.google.com/store/apps/details?id=com.solutionproviders.rapsongs&hl=en
Try like this
1.Right click your project
2.Select -> properties
3.Select -> Java Build Path
4.Select -> Libraries
5.Select -> Google play services lib.jar file
6.Select -> Remove
7.Select -> Add External JARS
8.Select -> New google paly service
9.Select -> Order and Export
10.Click -> Select All
11.Click -> ok
12.Select -> Clean your projects
13.finished
Second screen shot
1.Click Google play service.jar file
2.Remove your jar file
3. Add new Google play service.jar file
your problem solve
I have just imported an android project and when I am trying to run it it is giving me error on the following imports
import com.google.android.vending.licensing.AESObfuscator;
import com.google.android.vending.licensing.LicenseChecker;
import com.google.android.vending.licensing.LicenseCheckerCallback;
import com.google.android.vending.licensing.ServerManagedPolicy;
Any help resolving this would be greatly appreciated.
You’re getting those errors because you didn’t import the licensing library.
Go into the folder where u downloaded the android-sdks stuff.
So there are 2 things: I) a Licensing Library and II) the Sample Licensing App
I) The licensing library is located in:
UserName/android-sdks/extras/google/play_licensing/library
II) The Sample Licensing App is located in:
UserName/android-sdks/extras/google/play_licensing/sample
OR
In Eclipse, File-> New -> Other… -> Android Sample Project -> (Choose a Target and hit next) -> Google Play Licensing Library
Step 1:
In Eclipse, Go to File-> New -> Other… -> Android Project from Existing Code -> (Locate the library, ie= UserName/android-sdks/extras/google/play_licensing/library)
Step 2:
Once you have the library imported to Eclipse, right click on the package and go to Properties -> Android. Make sure the “Is Library” option is checked.
Step 3:
In Eclipse, File-> New -> Other… -> Android Sample Project -> (Choose a Target and hit next) -> Google Play Licensing Library. My package was named “play_licensing_sample” by default.
Step 4:
Right click on “play_licensing_sample” and go to Properties-> Android -> Add… -> (Choose the Licensing Library u made in Step 2)-> Apply
You’re done!
I ran into this issue when trying to set up my Android project for an APK expansion file.
The following steps resolved it for me:
Add downloader_library to eclipse as a "project from existing source" (it has errors)
Add licensing library to eclipse as a "project from existing source"
Add licensing library to downloader_library project
In android studio 2.2.3 I was able to fix the "package com.google.android.vending.licensing does not exist"
error by:
Right click the downloader_library module from your project view
Select "Open Module Settings"
Select "Dependencies" Tab
Press plus sign + then select "3 Module Dependency"
Select "market_licensing" and press OK.
Original writeup of fix at https://kitefaster.com/2017/02/15/expansion-apk-files-android-studio/
It took me 2 days to resolve this in my project
1)I discovered the folder here
2)created a folder here
3)copied the files (less the UTIL folder) here
enter image description here
In Android studio you need to add a folder same level as java(folder) called aidl. Take a look at the image for more specific.
You can get those file here - https://android.googlesource.com/platform/development.git/+/b8168f27f6f5b6b0ced5ef3210c0e89e8d3a5ae2/samples/MarketLicensing/src/com/android/vending/licensing
You may want to review the steps this link. It goes through the steps of adding it to your Android project, regardless of your IDE. Eclipse will work just fine.
These steps take some time and effort, but I have successfully done this before.
I am trying location update example from following link
http://developer.android.com/training/location/retrieve-current.html#AppPermissions
It gave me some errors that I resolved by adding google play services, the application is building without errors, but when I am running it (both using AVD or real device) it is giving ClassNotFoundException and is not working.
I am using eclipse and ADT for my development
Adding error snapshot for reference
You need to add the lib android-support-v4.jar that is is your sdk.
Then, go to project properties (alt+Enter) -> Java Build Path -> Order and Export and then check android-support-v4.jar. Clean the project and it will work.
If you don't know how to ass a library you can co to properties -> Java Build Path -> Libraries tab and then click to add external jars.
Did you include the Google-play-services.jar file and also please make sure you have this metadata included in your manifest
for more details - refer
http://developer.android.com/google/play-services/setup.html
I think you should right-click on the Android project, choose properties, Java Build Path, and Checks the "Android Private Libraries" under "Order and Export".
You should tick something ;)
Check this out
I have tried all the threads related to errors while integrating FB-SDK but was not successful , any answers are welcomed .
My Java Compiler is set to 1.6.
I get this error while integration the Facebook SDK to my App
it is giving me the error at that marked place as
path\facebook-android-sdk-3.0.2\facebook\bin(missing)
i get this error after added this by clicking OK .
Thanks in Advance .
Before moving on, I recommend you to get latest Facebook SDK, because there are some important changes between yours (3.0.2) and 3.0.
Here's what I do to import Facebook SDK
1- Download the latest SDK, extract it to a directory, i.e. X. (~/X)
2- Open Eclipse, New Project -> Android Project From Existing Code, then browse and choose ~/X/facebook-android-sdk-3.0 as root directory
3- Select only "facebook" project and click finish
4- Right click to facebook project -> properties. Choose Compiler Compliance level as 1.6 from Java Compiler section
5- Create new android project, and set it's compliance level 1.6 as well. Also in Android section of Project Properties, Click add button, and choose facebook project (that we imported in Step 3)
6- Finally, Project -> Clean. For me this works like a charm all the time.
Have you checked if you have the facebook jar inside your fb-sdk/bin folder? If it's not there, do a clean and build procedure first in your fb-sdk folder. It will produce a facebook.jar file on your bin folder.
After that, then, you may already do another clean and build on your main project folder.