Why do I have so many errors from the BaseGameUtils library? - java

I am following this link
https://developers.google.com/games/services/android/init
With trying to add leaderboards to an android app but after I follow step 1 and it is added it throws up over 100 errors and a Jar mismatch! Fix your dependencieserror, that I understand why.
I have added the google play library no problem and gotten adverts to work by following Google's documentation but the leaderboard documentation seems to be sending me all over the place and not helping at all.
Could someone please shed some light on this, thanks!

Ok because I am still new to Android and Eclipse I had added the reference to the BaseGameUtils in the properties for the project but you have to add the Google play services as a reference for the BaseGameUtils by right clicking and selecting properties then add it as you did for the main project.

Related

Why is my Android Studio project not opening with an activity?

When I hit "New Project" in Android Studio, I get a menu that asks me what type of project I want to make. The options are Java, Maven, Gradle, Groovy, Griffon, Static Web, Empty Project. I want to create a new project with an activity in order to start building an android app but the two options that seem remotely valid here are "Java" and "Empty Project". Choosng either of these does not create an activity for me. I tried to create an activity once the project was created by right clicking on the src file ->New->??? but I do not have an option here to create one. I am new to Android Studio could someone please help me as to why I cannot do this?
I looked at some video tutorials online and they all seemed to start with the correct menu, so online resources were of no help really...
I had this probelm either.
At last, I found that I hadn't activated the Android Support plugin.
Hope this will be helpful.
If I am right I believe you just select empty project to start a new android project. Androids website has an excellent tutorial to get beginners started: http://developer.android.com/training/basics/firstapp/index.html
I used this tutorial and it worked for me:
http://www.raywenderlich.com/78574/android-tutorial-for-beginners-part-1
Basicly you just click file\new project and you should be able to configure it and at the end you select "blank activity", which adds the activity in question. While I never saw a menu like the one you describe, it could be possible you just didn't download the important files with the sdk manager? You need the basic files and an api of your choice. It is also explained in the tutorial.

Can't add Library in eclipse android project ADT

EDIT: ANSWERED in comments
I have opened pandora's box worth of errors over the past few days and have boiled the source of my troubles down to my inability to correctly add the Google Play Services library into my project so I can have adMob ads. I should be able to go to Project>Properties>Android and then under Library hit add. However when I hit add, It's menu is all grayed out and I cant add, browse or do anything. I am using the new ADT bundle as of about April 2, "Build: v22.6.2-1085508". What exactly is wrong and how can I fix it?
Thank you very much!
Any help is greatly Appreciated!!

The import com.google.maps.android.R cannot be resolved

I'm trying to make an Android app with Google Maps feature. I have setup everything, and imported all the required libraries, etc.
But, I'm getting this annoying error, which I really don't understand what is wrong, I googled it but couldn't find any solution for this so I thought I should post here.
I'm using Android Maps Utils
https://github.com/googlemaps/android-maps-utils
and I'm getting this error: The import com.google.maps.android.R cannot be resolved
This error is coming in two files of Android Maps Utils.
DefaultClusterRenderer.java (Package: com.google.maps.android.clustering.view)
IconGenerator.java (Package: com.google.maps.android.ui)
Any help to resolve this issue will be highly appreciated. Thanks!
adding support library will solve this problem. select your project, go to android tools and then add support library. And then your error should not show there ! :)
I had the same problem. Right click on Project/properties/javaBuildPath Projects -> add library

Admod - Rendering Problems - Classes not instantiated

I'm trying to put Admob for android app in studio and then publish it on google play.
I have read that soon, google requires a very specific way of displaying banner.
I wonder if this form is correct and incidentally try to fix the bug that gives me.
The mobile works perfect, but not that get the error on android studio.
I put a picture to make it easier to find the error.
Hope you can help me, Thanks.
enter link description here
The error you are getting is from an old version of Admob (6.4.1), and is only an error when trying to render the AdView within your editor, it is not a runtime error.
Try using the new Admob SDK (the one from Google Play Services). It is much more likely to have this (editor only) bug fixed.

Facebook SDK crashes google-play-services-lib if imported as existing Android source code

I have an extremely strange problem to which finding solution seems to be very tricky. Here's the story:
The application I'm working on uses both Facebook SDK and Google Maps v2. Team mate was working on Google Maps and I was working on Facebook part. When we combine his and mine code it appears that just having FacebookSDK as an imported project in the workspace (not even referenced in Properties|Android|Library section of our app) , straight away makes the app not see the Google Maps library. The work around is to add Google Maps into Java build path, however the application still crashes when we try to access the activity based on Google Maps. Not having Facebook SDK in the workspace makes the Google Maps work. When the app is ran with Google Maps added to the Java build Path, when trying to access the Google Maps activity LogCat shows NoClassDefFoundError exception.
Hope I explained the problem well. If not then let me know what more is required to get closer to fixing this strange problem. Thanks :)
SOLUTION: It seems that adding Java Build Path reference to android_sdk\extras\google\google_play_services\libproject\google-play-services_lib\libs\google_play_services.jar file fixed the issue. Crysis averted. ;)

Categories

Resources