I update my android sdk last week to 4.0 (14) and I now have the following error when I try to use the C2DMessaging class:
java.lang.NoClassDefFoundError: com.google.android.c2dm.C2DMessaging
Does anybody already saw this error?
Best regards
add gcm.jar(client side) in your project build path.
Related
I use easymock-3.2.jar in my android test project.
I find it in its Home:
2013-07-11: EasyMock 3.2 is available. Add #Mock annotations and Android support.
However , I got exception when I use it.
java.lang.NoClassDefFoundError: org.easymock.EasyMock
I googled a lot , and add
dexmaker-1.0.jar
objenesis-1.2.jar
cglib-nodep-2.2.2.jar or cglib-2.2.jar
But the exception still be there.Who can help me?
Thanks a lot.
Put the library
easymock-3.2.jar
dexmaker-1.0.jar
dexmaker-mockito-1.0.jar
in tests/libs. And it will work.
Be careful , it's in tests/libs , not in tests/lib.
It will throw
java.lang.NoClassDefFoundError: org.easymock.EasyMock
if you position them in tests/lib.
The first step is to get EasyMock. You can get the latest version from Easymock’s download page. Choose the latest version and you will get a zip file. You only need easymock-3.2.jar (3.2 will change depending on the version you choose). You will also need dexmaker for Easymock to work on Android. You can get the jar from Dexmaker’s website. Once you have both jar files put them in /tests/libs. Now you have EasyMock available in your tests.
for more detail follow below link
http://ncona.com/2013/11/writing-unit-test-for-android-with-easymock/
I have an iOS Objective C code for iPhone that I am trying to convert into android using Apportable. The issue is that I am getting this error:
1 error generated.
scons: *** [Build/android-armeabi-debug/com.iapptechnologies.time/Users/Home/PhotoTastic/PhotoTastic/AppClasses/ViewController.m.o] Error 1
In file included from /Users/Home/PhotoTastic/PhotoTastic/OtherClasses/QBImagePickerController/QBAssetCollectionViewController.m:11:
/Users/Home/PhotoTastic/PhotoTastic/OtherClasses/QBImagePickerController/QBAssetCollectionViewController.h:12:9: fatal error:
'AssetsLibrary/AssetsLibrary.h' file not found
#import <AssetsLibrary/AssetsLibrary.h>
^
Any help would be much appreciated. Thanks!
It's strange that AssetsLibrary is not added automatically from parsing the xcode build.
A workaround is to add AssetsLibrary to the "deps" section of "add_params" in configuration.json
Note that AssetsLibrary is not available in the Starter version of the SDK. At least the Indie version is needed.
I think this will do,In xcode 5 it looks different but the path is the same
Description Resource Path Location Type
The declared package "org.cocos2dx.lib" does not match the expected package "src.org.cocos2dx.lib" Cocos2dxMusic.java /java/src/org/cocos2dx/lib line 24 Java Problem
Someone said that cocos2d-x 2.0.3 has a bug that will not create cocos2dx.lib.
Anybody know how to solve this?
I am trying to make use of the SlidingMenu Library for Android but I get these errors:
Could not find com.slidingmenu.lib.SlidingMenuActivity.apk
and another error:
E/AndroidRuntime(24767): java.lang.NoClassDefFoundError: com.slidingmenu.lib.SlidingMenu
I have properly added the com.slidingmenu.lib.SlidingMenuActivity to the Java Build section.
What I found is that some time between June 2012 and now (August 2013) the package name changed. Performing a global search-and-replace of com.slidingmenu.lib to com.jeremyfeinstein.slidingmenu.lib fixed the problem.
Troubleshoot Android 'Could not find somelibrary.apk'
Could not find Library.apk!
Troubleshoot Android 'java.lang.NoClassDefFoundError com.somelibrary.mylibrary'
Troubleshoot NoClassDefFoundError in Java
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