对不起,如果我的问题是愚蠢的事情。但我真的需要帮助。
我开发了一个Android应用程序(SdkVersion 27),它在Android模拟器中运行良好。但是几天前,我尝试在我真正的Android设备(Android 6.0.1)中安装并运行它。它发生了崩溃“不幸的是,myApp已停止”。
我试着搜索,仔细阅读错误日志。但它仍然不起作用。
以下是调试框架中的错误日志
我的解决方案
二进制xml文件行#0:错误膨胀类imageview
你必须看看你的图像是否已成为drawable-v23或v24,这可能高于你的移动操作系统级别,请务必避免在项目中创建可绘制的版本图像
示例在可绘制文件夹中〜> “ic_contact(V24)”
以下答案保存我的一天:
W/System: ClassLoader referenced unknown path:
/data/app/vn.edu.hcmut.orderfood-1/lib/arm
I/InstantRun: starting instant run server: is main process
W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
D/TextView: setTypeface with style : 0
D/aaaabbbbbb: Name like '%%%'
D/TextView: setTypeface with style : 0
D/AbsListView: Get MotionRecognitionManager
E/MotionRecognitionManager: mSContextService = null
motionService = com.samsung.android.motion.IMotionRecognitionService$Stub$Proxy@f906b95
D/ViewRootImpl: #1 mView = com.android.internal.policy.PhoneWindow$DecorView{5638b68 I.E...... R.....ID 0,0-0,0}
D/AbsListView: Get MotionRecognitionManager
D/AbsListView: Get MotionRecognitionManager
Get MotionRecognitionManager
D/AbsListView: Get MotionRecognitionManager
W/ResourceType: Failure getting entry for 0x7f0700ba (t=6 e=186) (error -75)
Failure getting entry for 0x7f0700ba (t=6 e=186) (error -75)
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main
Process: vn.edu.hcmut.orderfood, PID: 17894
android.view.InflateException: Binary XML file line #26: Binary XML file line #26: Error inflating class ImageView
at android.view.LayoutInflater.inflate(LayoutInflater.java:551)
at android.view.LayoutInflater.inflate(LayoutInflater.java:429)
at android.view.LayoutInflater.inflate(LayoutInflater.java:380)
at vn.edu.hcmut.orderfood.home_menu_search.MenuItemAdapter.getView(MenuItemAdapter.java:35)
at android.widget.AbsListView.obtainView(AbsListView.java:2934)
at android.widget.GridView.onMeasure(GridView.java:1069)
at android.view.View.measure(View.java:20195)
at android.support.constraint.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:934)
at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:973)
at android.view.View.measure(View.java:20195)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.support.v7.widget.CardView.onMeasure(CardView.java:258)
at android.view.View.measure(View.java:20195)
at android.support.constraint.ConstraintLayout.internalMeasureChildren(ConstraintLayout.java:934)
at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:973)
at android.view.View.measure(View.java:20195)
at android.support.v4.view.ViewPager.onMeasure(ViewPager.java:1632)
at android.view.View.measure(View.java:20195)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:20195)
at android.widget.ScrollView.measureChildWithMargins(ScrollView.java:2109)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.widget.ScrollView.onMeasure(ScrollView.java:510)
at android.view.View.measure(View.java:20195)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:20195)
at android.support.constraint.ConstraintLayout.onMeasure(ConstraintLayout.java:1028)
at android.view.View.measure(View.java:20195)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.support.v7.widget.ContentFrameLayout.onMeasure(ContentFrameLayout.java:141)
at android.view.View.measure(View.java:20195)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:20195)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at android.view.View.measure(View.java:20195)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330)
at android.widget.LinearLayout.measureChildBeforeLayout(LinearLayout.java:1464)
at android.widget.LinearLayout.measureVertical(LinearLayout.java:747)
at android.widget.LinearLayout.onMeasure(LinearLayout.java:629)
at android.view.View.measure(View.java:20195)
at android.view.ViewGroup.measureChildWithMargins(ViewGroup.java:6330)
at android.widget.FrameLayout.onMeasure(FrameLayout.java:194)
at com.android.internal.policy.PhoneWindow$DecorView.onMeasure(PhoneWindow.java:3094)
at android.view.View.measure(View.java:20195)
at android.view.ViewRootImpl.performMeasure(ViewRootImpl.java:2646)
at android.view.ViewRootImpl.measureHierarchy(ViewRootImpl.java:1601)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1893)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1489)
at android.view.ViewRo
I/System.out: (HTTPLog)-Static: Hongbao
I/System.out: (HTTPLog)-Static: Hongbao
I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
I/System.out: (HTTPLog)-Static: Hongbao
I/System.out: (HTTPLog)-Static: Hongbao
(HTTPLog)-Static: isSBSettingEnabled false
I/System.out: (HTTPLog)-Static: isSBSettingEnabled false
I/qtaguid: Tagging socket 37 with tag d74deda900000000{3612208553,0} uid -1, pid: 17894, getuid(): 10164
I/qtaguid: Tagging socket 42 with tag d74deda900000000{3612208553,0} uid -1, pid: 17894, getuid(): 10164
I/qtaguid: Untagging socket 37
I/qtaguid: Untagging socket 42
I/Process: Sending signal. PID: 17894 SIG: 9
Disconnected from the target VM, address: 'localhost:8601', transport: 'socket'