android studio真机运行没问题,genymotion运行报错

配置android studio+genymotion导入自己的项目,编译没有问题,在自己的真机环境也可以运行,用genymotion启动运行后就报错
报错如下:

图片说明

07-14 21:48:51.428 7839-7839/com.painter.bdcircle D/AndroidRuntime: Shutting down VM
07-14 21:48:51.428 7839-7839/com.painter.bdcircle W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa4c9bb20)
07-14 21:48:51.428 7839-7839/com.painter.bdcircle E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.painter.bdcircle, PID: 7839
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.painter.bdcircle/com.painter.bdcircle.activity.SplashActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.ImageView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2184)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
at android.app.ActivityThread.access$800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.ImageView
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)

网上有一篇和我类似文章:http://bbs.csdn.net/topics/391921707
说gradle2.0+ 配置
android {
defaultConfig {
vectorDrawables.useSupportLibrary = true
}
}
但我加上后编译运行还是一样的错误

1个回答

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.painter.bdcircle/com.painter.bdcircle.activity.SplashActivity}: android.view.InflateException: Binary XML file line #7: Error inflating class android.widget.ImageView

看看SplashActivity的xml布局第七行。把布局文件也贴出来看看吧。

猜测:会不会是genymotion和真机Android版本不一样。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问