No class found in android studio
i imported my projected from eclipse to android studio it was working fine and in android studio it works in emulator but in real device
here is log
05-04 08:14:14.989 8986-9070/com.rcmbusiness E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 Process: com.rcmbusiness, PID: 8986 java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841) Caused by: java.lang.NoClassDefFoundError: org.ksoap2.serialization.SoapObject at com.rcmbusiness.utility.APIRequest.doInBackground(APIRequest.java:113) at com.rcmbusiness.utility.APIRequest.doInBackground(APIRequest.java:29) at android.os.AsyncTask$2.call(AsyncTask.j ava:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841)
Gradle
compile 'com.android.support:support-v4:23.0.0'
compile 'com.android.support:appcompat-v7:23.0.0'
compile 'com.android.support:design:23.0.0'
compile 'com.google.android.gms:play-services:+'
compile 'com.google.code.gson:gson:2.2.2'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.daimajia.slider:library:1.1.5@aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:cardview-v7:23.0.0'
compile 'com.android.support:recyclerview-v7:23.0.0'
compile 'com.github.bumptech.glide:glide:3.6.1'
compile files('libs/AndroidAnimations.jar')
compile files('libs/AndroidEasingFunctions-1.0.0.jar')
compile files('libs/gcm.jar')
compile files('libs/ksoap2-android-assembly-3.0.0-jar-with- dependencies.jar')
At first, You should remove ksoap in Project Structure and do the steps bellow. I have same problem and here is the way which work for me. 1st: Make folder libs in app/libs. 2nd: Copy ksoap.jar to this folder. 3rd: right click to Jar file and chose add as library. Then, import ksoap2 normally way.
链接地址: http://www.djcxy.com/p/78418.html上一篇: Android APP,崩溃Catlog提供,线程异常
下一篇: 在android studio中找不到类