I am trying to use the new Google Play Services for Google Plus integration from this link: http://ankitthakkar90.blogspot.sg/2013/05/google-plus-integration-in-android.html
I was able to get everything right except when i try to run it, it provide me with this error
Android Launch!
adb is running normally.
Performing com.anky.googleplus.MainActivity activity launch
Automatic Target Mode: using device 'CB5A1MQW4P'
Uploading GooglePlusDemo.apk onto device 'CB5A1MQW4P'
Installing GooglePlusDemo.apk...
Success!
Could not find google-play-services_lib.apk!
Starting activity com.anky.googleplus.MainActivity on device CB5A1MQW4P
ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.anky.googleplus/.MainActivity }
I did reference the library via eclipse Properties > Android > Add Library like what is done here: Using the new Google Play Services
This error still occured. Any suggest and feed back is welcome.
When Adding refenced libraries we need only google-play-services_lib.jar.So that we need to remove the project from your project.
Project->Properties->javaBuildPath->Project->select google-play-services->remove.
clean and build.
Well i had this same problem.. I then found out that i had incorrectly referenced it first in the java build path before referencing it from the Properties > Android > Add Library .
Solution
First remove both the reference from the java build and the Properties > Android > Add Library then reference google_Play_services_lib from Properties > Android > Add Library again.
Hope this helps :)
You don't install the google-play-services_lib APK, you should reference it on your project as an Android Library Project and the JAR will be included inside your APK.
http://developer.android.com/google/play-services/setup.html
This link teaches you how to reference an android library project:
http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject
In your manifiest file put it inside
<meta-data
android:name="com.google.android.gms.version"
android:value="#integer/google_play_services_version" />
In my case this error was fixed by checking Android Private Dependencies checkbox in google-play-services_lib eclipse project > Properties > Java Build Path > Order and Export tab. It was checked as well in the main project which has the reference to google-play-services_lib.
I still get the Could not find google-play-services_lib.apk! error in console but the maps activities run OK, while before the change I got run time errors and the application crashed.
My advice is to copy google-play-services.jar to libs folder of the project. It worked for me.
I think the device on which you are trying to run the Google Play Services does not contain the Google Play services APK.
Check this link on Android Developers for more clearance
Ensuring Devices Have the Google Play services APK
Check whether that the library project is added into project, if not then check whether the library project and your project is in same directory.
Related
For the last 2 days I've been trying to simply get Google play game services Integrated into my game. I've followed the instructions here...
https://github.com/playgameservices/android-basic-samples/blob/master/README.md
...many many times. I have been trying to get it to build with Gradle but for now, I'll just focus on Eclipse building until that works. I've imported BaseGameUtils project into my workspace as an Android library project. My game android project has two Android library dependencies: google-play-services_lib and BaseGameUtils. Everything in Eclipse is showing without any errors. When I build and run on a real device, I see an error that says -
[2014-10-27 20:39:25 - BaseGameUtils] Could not find BaseGameUtils.apk!
I don't know why it's even looking for BaseGameUtils.apk since it should be an Android library. That said, I'm not sure how an Android library is really handled so maybe it should be a .apk. In any case, I couldn't find any information on this bug and the error message doesn't give me much to work with. I've tried adjusting things in the Build Path but no luck. I did have to remove some redundant dependencies in my Build Path earlier since I was getting some kind of duplicate DEX error but I'm not sure that's related in any way to this. I am desperate for help, anyone have any idea?
Can you try this? It has to do with conflicting methods of specifying that a project is a library.
I found the source of the problem!
It turns out that "with the new library feature, you don't specify the
Android projects you depend on in the Java Build Path section of the
Properties. You do it in the Android section of the Properties".
So all I had to do is go the Application Project's Properties, hit the
Projects tab, select my own library project and click the Remove
button. That's it. No more problem.
In Eclipse Java EE select the project Properties, then select Project
References, then check the FacebookSDK (see screen capture)
From: Android Eclipse - Could not find *.apk
If that doesn't help, you may want to double check that you selected "Is Library" in BaseGameUtils.
Also, when you hit "Run" in Eclipse, are you running your application and not BaseGameUtils?
Please would you check that BaseGameUtils has "is library" checked and that your application project DOES NOT have "is library" checked.
If this is correct, then please would you review the following in detail (especially as regards checking and unchecking "is library" ) :
Android Eclipse - Could not find *.apk
I presume that the DEX error related to two or more versions of the same lib. What is the specific GameHelper error ?
As a general point, I find it productive to get a sample project working first to ensure that I have got the environment working correctly before I start integrating game services into my own projects. If you have been changing the build path then it may be quicker to start from scratch and get a sample working. I have followed those instructions in the past and they are accurate.
I'm integrating google map v2 to my android app, I'm using Eclipse with minimum SDK Version version 10. I'm using a Samsung Galaxy Ace as a test device.
I've read and done the necessary steps in this site:
http://developer.android.com/google/play-services/setup.html
https://developers.google.com/maps/documentation/android/start
I've also consult this tutorials:
http://www.vogella.com/articles/AndroidGoogleMaps/article.html
http://www.androidhive.info/2013/08/android-working-with-google-maps-v2/
The problem is that the google-play-service_lib seems to be not included although I have done the step Project > Properties > Android > Add: google-play-service_lib
Here is a screenshot:
I've tried solving this problem by doing Project > Properties > Java Build Path and adding the google-play-service_lib, but this will cause a runtime error java.lang.noclassdeffounderror: com.google.android.gms.R$styleable
Has anyone encounter this problem, and how did you solve this?
Make sure that your project code and google-play-service_lib's code are at same place otherwise it will keep fireing import error.
As you said
I add the library project, it is green. But when I visit the Project > Properties > Android part again, it will be red.
Just copy your project into your workspace or if its already copied into the workspace make sure you have also copied your Google-play-services library into your workspace otherwise it will always give you library error as it will not get the library available into your workspace.
The problem is because when you are importing lib project at that time you haven't copy that project in to workspace.
So finally when import it enable "Copy to Workspace" checkbox.
And after that give a reference to your project like below image.
I am writing a MAP APP using Android Google Maps V2
But i am facing dependency problem, please see below images:
as you can see in above screen shot i am getting RedAlert Sign over Project Name
and as you can see in above screen shot getting RedCross over Android Dependencies
#ChulbulPandey
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
Path of google-play-services_lib at SDK;
\extras\google\google_play_services\libproject\google-play-services_lib
I am not sure but you can try this.
In Libraries tab remove the Google Maps V2 jar and add it again.
First, try changing project build target to something higher and then clean then build your project.
If that doesn't solve your issue then removing your external jar files linked and then import it again.
You must import google-play-services_lib library project from SDK and add a dependency to it from your project.
Path of google-play-services_lib at SDK;
\extras\google\google_play_services\libproject\google-play-services_lib
See link
I made library for my android games and i wanted to add it to another project to test how it works, but when i ran the application, it does not seemed to be able to find my library files(INSTALL_FAILED_MISSING_SHARED_LIBRARY). I have my library .jar in "libs" folder and i also have it added to my Libraries and Order and Export tabs in build path. In my manifest, i have tag. I have Eclipse with ADT. Is there any way to fix this?
Are you using Google Maps in your application? If so, this may solve your problem: INSTALL_FAILED_MISSING_SHARED_LIBRARY error in Android
You wrote:
In my manifest, i have tag
If you are adding custom uses-library tags, that might be your problem. See: Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
I managed to restructure my application pretty nicely so that, except for a few methods in a derived Activity class, everything is in a Library Project.
It works beautifully, except that Eclipse's Console (not LogCat!) issues the following error message:
[2011-06-13 19:54:08 - MyLibrary] Could not find MyLibrary.apk!
I cleaned both projects (library and application), restarted Eclipse, re-built the projects, but this weird error message persists.
What does this error message mean? (especially in light that everything seems to be running OK)
How do I get rid of it?
UPDATE: I tried removing the project then re-importing it per the suggestion below. It didn't help. I then found this thread that helped me realize that I had <uses-library> in the application's AndroidManifest.xml referring to MyLibrary. I deleted it, cleaned the project and rebuilt. The problem persists.
I am now suspecting this is "real problem", e.g. misconfiguration of some paths or something else on my part. What could it be?
I found the source of the problem!
It turns out that "with the new library feature, you don't specify the Android projects you depend on in the Java Build Path section of the Properties. You do it in the Android section of the Properties".
So all I had to do is go the Application Project's Properties, hit the Projects tab, select my own library project and click the Remove button. That's it. No more problem.
In Eclipse Java EE select the project Properties, then select Project References, then check the FacebookSDK (see screen capture)
Thanks to Lance Nanek!
That's interesting... I didn't quite do what the answer specifies..
I have a separate android project called "ConnectionHandler" which connects to a webservice to retrieve information. This project contains no activity classes. (If it did, you would require changes to the AndroidManifest file in your Main Application, as well as following the instructions below).
To use my seperate ConnectionHandler project as a library I needed to do the following:
In the Main Application > Select project properties > Go to Java Build Path > Add Jars > Select the bin folder of ConnectionHandler > choose connectionhandler.jar
In the ConnectionHandler project > Select project properties > Android > Check isLibrary
In the MainApplication > Select project properties > Go to Android > Add reference to ConnectionHandler in the Library section.
This works for me, and I am able to connect to my webservice, even though I have no source files to do this in my main application. Everything is contained within my ConnectionHandler jar that is being referenced..
Hope this helps someone...
Today I started getting this error message on the Console view of Eclipse, but it turns out that this was not the problem. My application would be built and installed on my device, and even ran for a fraction of a second (until it crashed). This is what my Console view looked like on Eclipse:
[2013-06-03 09:42:25 - my-android] Android Launch!
[2013-06-03 09:42:25 - my-android] adb is running normally.
[2013-06-03 09:42:25 - my-android] Performing com.my.android.activity.MainActivity activity launch
[2013-06-03 09:42:25 - my-android] Uploading my-android.apk onto device '650rfs2e'
[2013-06-03 09:42:31 - my-android] Installing my-android.apk...
[2013-06-03 09:42:35 - my-android] Success!
[2013-06-03 09:42:36 - my-other-android] Could not find my-other-android.apk!
[2013-06-03 09:42:36 - android-SherlockFragment] Could not find android-SherlockFragment.apk!
[2013-06-03 09:42:36 - my-android] Starting activity com.my.android.activity.MainActivity on device 650rfs2e
[2013-06-03 09:42:36 - my-android] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.my.android/.activity.MainActivity }
But upon close inspection of my LogCat, there was a silly exception being thrown from a fragment I was trying to initialize. Once I fixed my fragment (which was raising an NPE), everything worked out just fine, even through my console still tells me it can't find those library APK's.
Have you tried removing the project without deleting from the harddrive and reimporting the project. That seemed to work for me when I had this problem.
Using the Eclipse Preferences you can end up with libs getting added all over the place. I had a referenced lib in /libs and Referenced Libraries folders. I had to remove or delete them from these locations and insert it at Android Dependencies (using Preferences -> Android and browsing below the "Is Library" checkbox.)
The correct layout for my project:
http://www.pasteall.org/pic/show.php?id=34513
For me, the reason this was happening was that the library project and the main project had the same package. The easiest way to change the package is to right click on the library project > Android Tools > Rename Application Package.
The solution to this problem for me, was to remove erroneous entries from the library projects' Manifest file.
The crash would only occur at runtime when it hit the first usage of my library project. Once I change the Application Name property to reflect the correct application class for the project that used the library project, then it worked