I am trying to create an android application that is location aware using google play services as it seems that is the new recommended fashion for doing this. I have used the tutorial I found on the android developers site to setup my project. It seems correct and builds fine, however, when the activity just BEFORE the activity that has the google play services dependencies starts I see the following in log cat.
06-18 01:31:04.126: I/dalvikvm(30480): Failed resolving Lcom/example/activities/NewActivity; interface 1045 'Lcom/google/android/gms/common/GooglePlayServicesClient$ConnectionCallbacks;'
06-18 01:31:04.126: W/dalvikvm(30480): Link of class 'Lcom/example/activities/NewActivity;' failed
06-18 01:31:04.126: W/dalvikvm(30480): Unable to resolve superclass of Lcom/example/activities/NewActivity_; (930)
06-18 01:31:04.126: W/dalvikvm(30480): Link of class 'Lcom/example/activities/NewActivity_;' failed
06-18 01:31:04.126: E/dalvikvm(30480): Could not find class 'com.example.activities.NewActivity_', referenced from method com.example.activities.HomeActivity.clickCurrentDonation
06-18 01:31:04.126: W/dalvikvm(30480): VFY: unable to resolve const-class 936 (Lcom/example/activities/NewActivity_;) in Lcom/example/activities/HomeActivity;
Here NewActivity is the activity using google play services that is unable to load and HomeActivity is the activity that calls NewActivity. These errors appear on load of the HomeActivity even before I try to start NewActivity.
I have confirmed that this works normally if I do not include the google play services code.
The only thing I am doing that seems to be different than the norm or than the tutorial is that I am using the android-annotations project which is why you'll see references above to the NewActivity_ which is a generated class this uses based on the code I write in the base class.
Has anyone else encountered this or have any idea how to resolve?
Thanks for any help!
Just re install the Google Play services from SDK Manager and try to link again and clean- build the project.
If still It does not work, download another SDK folder and install Google Play Services and import the Google Play Services project in your workspace and link to your current project.
I don't knw..Its quite strange But It worked for me.
Related
I have uploaded the Android app into playstore. While downloading it for the first time it gets crashed but after that it works fine. Its showing the error as Unable to instantiate receiver com.google.android.apps.analytics.AnalyticsReceiver Caused by java.lang.ClassNotFoundException: Didn't find class "com.google.android.apps.analytics.AnalyticsReceiver" .
How to resolve this issue?
I believe that issue related to your manifest file and refer to INSTALL_REFERRER.
Make sure if AnalyticsReceiver class included to your app
My suggestion, if you not use that receiver you can remove it, otherwise will keep throw crash error
Note:
As far as I know com.google.android.apps.analytics.AnalyticsReceiver from Google Analytics SDK v3
While if you using Google Analytics SDK v4 you should use com.google.android.gms.analytics.CampaignTrackingReceiver
Please read this post too
I am creating an app tht uses Google Maps API v2. It works fine, except for a little annoying this, when I use the setMyLocationEnabled(true); method, I get a ClassNotFoundException. I can just click "Resume" and the app continues. When running without debugger, there is nothing you can see happening.
This is what LogCat is saying:
09-23 22:39:31.645: I/dalvikvm(2067): Failed resolving Lcom/google/android/gms/location/internal/ParcelableGeofence; interface 4023 'Lglm;'
09-23 22:39:31.645: W/dalvikvm(2067): Link of class 'Lcom/google/android/gms/location/internal/ParcelableGeofence;' failed
09-23 22:39:32.473: W/dalvikvm(2067): VFY: unable to resolve static field 4203 (CREATOR) in Lcom/google/android/gms/location/internal/ParcelableGeofence;
It looks like a missing class in the library, and if I jump into the library project, I indeed do not see that class.
Is there anything I can add / fix to make this exception go away?
I have seen that logcat error before and I noticed it is due to mismatch in my API key between debug and release mode. If you are using separate key store for debug, please make sure you have included both debug and release SHA1+package.name combos in the Google Dev Console.
I have a problem with the new ActionBarSherlock.
I have to link it to my project and use it's features (Fragments, etc), in a project that supports android API level 7 and above.
I have created a module in intelij with my project, and I've linked the ActionBarSherlock library project to it. Everything looks good, the project rebuilds correctly, deploy a valid apk to emulator, but when I'm trying to run the application I got something like this:
WARN/dalvikvm(540): Unable to resolve superclass of Lcom/mobileinsight/common/CustomActivity; (134)
WARN/dalvikvm(540): Link of class 'Lcom/mobileinsight/common/CustomActivity;' failed
WARN/dalvikvm(540): Unable to resolve superclass of Lcom/mobileinsight/ui/SplashActivity; (175)
WARN/dalvikvm(540): Link of class 'Lcom/mobileinsight/ui/SplashActivity;' failed
WARN/dalvikvm(540): threadid=3: thread exiting with uncaught exception (group=0x4001b188)`
ERROR/AndroidRuntime(540): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.mobileinsight/com.mobileinsight.ui.SplashActivity}: java.lang.ClassNotFoundException: com.mobileinsight.ui.SplashActivity in loader dalvik.system.PathClassLoader#45f352e8
I get the error when the application tries to instantiate an activity that extends SherlockActivity or FragmentSherlockActivity
Somebody can help me with this?
Thanks,
Ark
I updated my Phonegap (Cordova) project from 1.9 to 2.0 and am receiving the following two new errors:
Web Console
JSCallback Error: Request failed. at file file://android_assets/www/js/cordova-2.0.0.js:3698
and
dalvikvm
Could not find class 'android.webkit.WebResourceResponse', referenced from method org.apache.cordova.CordovaWebViewClient.generatedWebResourceResponse
Is this a known problem? I have searched but can't find a solution that addresses these issues. I have tried creating a new blank project and I am getting the same errors. I have also ensured Eclipse and the SDK manager are up to date.
Any help would be much appreciated.
Thank you.
Not sure about the first question as I need to know what you are doing when that log appears.
Regarding the second question:
https://stackoverflow.com/a/12043959/41679
I'm using the Java Google APIs for an Android application. I followed the usage pattern described here for Authenication and API use: http://goo.gl/rPZ9Z
The problem I'm having is that the call to GoogleTransport.create() throws a NoClassDefFoundException. I looked at the log and the HttpHeaders class is not linking properly. I attached the Google API JAR file using the normal method in eclipse and all other classes I'm using are working correctly. Problem is that this one class in particular is not linked correctly. Here are some logs of the app running but not calling the class:
01-27 14:04:34.390: WARN/dalvikvm(422): Link of class 'Lcom/google/api/client/http/HttpHeaders;' failed
01-27 14:04:34.400: WARN/dalvikvm(422): Unable to resolve superclass of Lcom/google/api/client/googleapis/GoogleHeaders; (43)
Log of direct call to GoogleTransport.create():
01-27 16:13:11.882: ERROR/AndroidRuntime(16086): java.lang.NoClassDefFoundError: com.google.api.client.http.HttpHeaders
01-27 16:13:11.882: ERROR/AndroidRuntime(16086): at com.google.api.client.http.HttpTransport.(HttpTransport.java:145)
01-27 16:13:11.882: ERROR/AndroidRuntime(16086): at com.google.api.client.googleapis.GoogleTransport.create(GoogleTransport.java:58)
Thanks in advance!
Sounds like your project references are messed up. Try checking the library dependencies.