在android studio中找不到类

我从eclipse导入我的投影到android工作室,它工作的很好,在android工作室它在模拟器中工作,但在真实的设备

这里是日志

05-04 08:14:14.989 8986-9070 / com.rcmbusiness E / AndroidRuntime:致命异常:AsyncTask#1进程:com.rcmbusiness,PID:8986 java.lang.RuntimeException:在android中执行doInBackground()时发生错误.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)在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:587)在java.lang.Thread.run(Thread.java:841)引起:java.lang.NoClassDefFoundError:org.ksoap2.serialization.SoapObject 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)

摇篮

 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')

首先,您应该删除Project Structure中的Ksoap并执行以下步骤。 我有同样的问题,这是对我有用的方式。 第一:在app / libs中创建文件夹库。 第二:将ksoap.jar复制到此文件夹。 第3步:右键单击Jar文件并选择添加为库。 然后,通常导入ksoap2的方式。

链接地址: http://www.djcxy.com/p/78417.html

上一篇: No class found in android studio

下一篇: How to add user to a role