BaseGameUtils - unable to compile the source project - android

I am trying to have leaderboards in my android app. I was trying to use the library BaseGameUtils. This library is referencing the google play services library. When I clean my workspace I get the message for the library BaseGameUtils that the google-play-services_lib.jar is missing in a specified path. But actually the jar file is there in that path. Because of this When I refer the library BaseGameUtils the actual game APP is having an error marking. Kindly assist me to resolve this

More info might help to clarify your question more.
But let me see if my being from struggling with the Play Games Service for the past day helps:
first of all, make sure your Google Play Service is updated through SDK manager. After that, COPY THE ENTIRE FOLDER google-play-services_lib to your project and do all the referencing work accordingly.
After all that, check to see if the file res/values/version.xml from google-play-service_lib has the updated version number 4323000

Related

Could not find BaseGameUtils.apk

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.

GooglePlayServicesUtil: The Google Play services resources were not found

I'm getting this error message repeated 3 times after implementing leaderboard/achievement coding:
07-18 10:27:02.351: E/GooglePlayServicesUtil(14261): The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.
this appears to be generated by the 'GameHelper.java' file in the imported 'BaseGameUtils' library project referenced as a library by my game app.
I have google-play-sevices_llb imported to my workspace, and its referenced as a library in the BaseGameUtils library itself. there is a google-play-services.jar in the Android Private Library of BaseGameUtils. there is a google-play-services_lib.jar in the Android Dependencies folder. there is a android-support-v13.jar in the base folder of BaseGameUtils (updated from v4). I believe everything is set up correctly on the developer and game.developer pages and I have the 2 required lines added in the manifest of my game app.
I see pages on this for google mapping and admob where the answers basically suggest ignoring it if everything appears to be working. however, I don't see pages on this error for leaderboards/achievement implementation and it does appear to be preventing the service connection here.
I'm unable to access services for leaderboards/achievements. I'm still getting abmod banners so my game app does appear to access services code, the services jar is also in my game app's private library.
Please import google_play_services project in /sdk/extras/google/google_play_services/libproject because you need resources -res's folder in this project.
You add google-play-services.jar in libs not enough.
Hope this help!!!!

Red Exclamation Mark appeared when I add google play services lib

I am using GCM in my project for push notifiaction, but when I added google play service library into my project after importing this, A red exclamation mark appeared in my project, I already have seen different question and answers regarding this problem when I saw my build path of project there is cross sign on Android dependencies folder please help me,
You are supposed to import the whole google play project and use it as a library project for your own project, not just the jar. Try Google's guide again.
Check to see if your google play lib looks like this:
That means the jar is not available in bin directory...check manually that the jar is available or not in that directory..

Android error: Google play service version

I've this popular problem developing an android application with Eclipse:
error: Error: No resource found that matches the given name (at 'value' with value '#integer/
google_play_services_version').
So I've tried to import the google play library as specified here but I've this error:
Invalid project description.
C:\Users\Max\workspaceAndroid\google-play-services_lib overlaps the location of another project: 'google-play-services_lib'
Infact if I try to manage the libraries of the project I get this:
It seems that the google play libraries are already imported and I can't add new library.
The last chance I think I've is to add manually the string
compile 'com.google.android.gms:play-services:4.4.2#aar'
to my build.grade as specified in this answer but I don't know where find the file or if this will solve my problem.
How can I fix the error? Thanks!
Have you had the Google Play services installed already via the Google SDK Manager?
It looks like the following for me:
Here's what i did in the whole setup, to use the Google Maps Android V2 api
Google Maps API setup, Android V2 API
I had the same issue and was able to solve it by
Importing the google play services as an android project in eclipse
Adding reference to this imported project as a 'Lib' in
README.txt under google-play-services-lib reads like this;
Library Project including Google Play services client jar.
This can be used by an Android project to use the API's provided
by Google Play services.
There is technically no source, but the src folder is necessary to ensure that the build system works. >The content is actually located in the libs/ directory.
USAGE:
Make sure you import this Android library project into your IDE and set this project as a dependency.
Note that if you use proguard, you will want to include the options from proguard.txt in your configuration.

Import code issues google

I have been working with Java for about a couple of months now and I have been stuck introducing Google API into my Maps app. I need some help with these imports.
Here is what I did: I was following the code of a Places API demo which I can link if needed. I ended up having to add some libraries. Before I did, I was getting errors from all of the imports that started with com.google.api.client...etc. Then once I added all of these libraries, I then got left with 2 errors out of my imports.
The errors are: the "com.google.api.client.googleapis.GoogleHeaders" and "com.google.api.client.http.json.JsonHttpParser". I am receiving them both as "cannot be resolved to a type". These errors are causing some more errors throughout the rest of my code. I was hoping someone can help me solve this. I know it should have something to do with my code, but I am not sure what is going on. I know I am missing something.
Also, I installed the Google Plugin to install the APIs and when I did, I added the "Google + API" and the "GoogleOAuth2" APIs and that is where I am stuck at. Please someone help.
Here is the screenshot: Full Screenshot
I haven't worked with Maps, but as I understand it Maps is now packaged with Google Play Services, which I have been working with recently.
Firstly, the installation of Google Play Services is well-documented and you should look at this (if you haven't done so already):
http://developer.android.com/google/play-services/setup.html
There are a few areas that cause difficulty, and one is the section "Set Up a Project with the Library". There are different possible approaches but I suggest you take the following steps.
Ensure that the Google Play Services lib (and any other libs) are defined as library projects (Properties ...Android.. Library ...IsLibrary) and that they have no errors (cleaning may not be sufficient - you may have to shut down Eclipse to remove the errors).
When the library projects are error free, add them to your project. The normal way of doing this is to REFERENCE them (check what the documentation says) but you do this by (Properties ...Android.. Library ...Add).
Then check out (Properties ... Java Build Path ...) - read the documentation but you need your libs in here.
Then clean your project but note that a restart of Eclipse may be necessary to remove the errors from your project.
There are other errors that can arise - another common one arises if you have different versions of the v4 support lib in your libs / project and you get a message "...this check is based on SHA1 at this time". This is well documented on Stack Overflow.
Good luck !

Categories

Resources