我是android开发的新手,在运行时发生致命异常:
`com.ymapps.restaurants.mobifooddemo.single E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.ymapps.restaurants.mobifooddemo.single, PID: 930
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ymapps.restaurants.mobifooddemo.single/com.ymapps.restaurants.YMAMainActivity}: com.a.a.a: Could not instantiate mapper : com.thoughtworks.xstream.mapper.EnumMapper : com.thoughtworks.xstream.mapper.EnumMapper
Caused by: com.a.a.a: Could not instantiate mapper :
at com.a.a.c.a(Unknown Source)
at com.a.a.c.g(Unknown Source)
at com.a.a.c.<init>(Unknown Source)
at com.a.a.c.<init>(Unknown Source)
at com.a.a.c.<init>(Unknown Source)
at com.a.a.c.<init>(Unknown Source)
at com.a.a.c.<init>(Unknown Source)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2159)
Caused by: java.lang.NoClassDefFoundError: com/thoughtworks/xstream/mapper/EnumMapper
Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.mapper.EnumMapper
Caused by: java.lang.ClassNotFoundException: com.thoughtworks.xstream.mapper.EnumMapper
Xstream1.4.7.jar被添加到libs文件夹中。
这显示.java文件中的错误
import android.content.IIntentReceiver;
import android.content.pm.IPackageManager;
import android.net.IConnectivityManager;
import com.google.android.collect.Lists;
import com.android.internal.app.IVoiceInteractor;
import libcore.io.DropBox;
etc
我无法理解这个问题。我认为xstream类无法通过应用程序识别。 xstream1.4.7.jar文件已添加为库
build.gradle file:
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/xstream-1.4.7.jar')
我该怎么办?请帮我.. 谢谢