2016-08-24 43 views
0

我正在運行genymotion,當我在模擬器上測試應用程序的罰款,但只要我嘗試在聯想瑜伽選項卡上運行它3它開裂。 這是logcat的應用程序崩潰與聯想瑜伽標籤3但與模擬器

九月8日至24日:54:33.192 16995-16995/com.example.mauricio.pairlines W /藝術:機器人4.1,方法之前android.graphics.PorterDuffColorFilter android.support.graphics.drawable。 VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter,android.content.res.ColorStateList,android.graphics.PorterDuff $ Mode)會錯誤地覆蓋android.graphics.drawable.Drawable中的包私有方法 08-24 09:54 :34.210 16995-16995/com.example.mauricio.pairlines I/art:Alloc部分併發標記掃描GC已釋放223(22KB)AllocSpace對象,0(0B)LOS對象,57%免費,743KB/1767KB,暫停471us總計11.763 ms 08-24 09:54:34.238 16995-16995/com.example.mauricio.pairlines I/art:Alloc併發標記掃描GC已釋放18(12KB)AllocSpace對象s,0(0B)LOS對象,58%免費,731KB/1755KB,暫停682us總計21.954ms 08-24 09:54:34.239 16995-16995/com.example.mauricio.pairlines I/art:強制收集SoftReferences對於99MB分配 08-24 09:54:34.258 16995-16995/com.example.mauricio.pairlines I/art:Alloc併發標記掃描GC已釋放11(344B)AllocSpace對象,0(0B)LOS對象,58%空閒,730KB/1754KB,暫停613us總計18.430ms 08-24 09:54:34.262 16995-16995/com.example.mauricio.pairlines E/art:拋出OutOfMemoryError「未能分配104530188字節分配,其中包含1048480個空閒字節和95MB直到OOM「 08-24 09:54:34.275 16995-16995/com.example.mauricio.pairlines I/art:Alloc部分併發標記掃描GC釋放6(192B)AllocSpace對象,0(0B)LOS對象,58%免費,730KB/1754KB,暫停541us共計7.420ms 08-24 09:54:34.295 16995-16995/com。 example.mauricio.pairlines I/art:Alloc併發標記掃描GC釋放3(96B)AllocSpace對象,0(0B)LOS對象,58%空閒,730KB/1754KB,暫停591us總計18.615ms 08-24 09:54: 34.296 16995-16995/com.example.mauricio.pairlines I/art:強制收集SoftReferences用於99MB分配 08-24 09:54:34.315 16995-16995/com.example.mauricio.pairlines I/art:Alloc併發標記掃描GC釋放3(96B)AllocSpace對象,0(0B)LOS對象,58%空閒,730KB/1754KB,暫停459us總計18.624ms 08-24 09:54:34.316 16995-16995/com.example.mauricio.pairlines E/art:拋出OutOfMemoryError「未能分配104530188字節分配,1048480空閒字節和95MB直到OOM」 08-24 09:54:34.316 16995-16995/com.example.mauricio.pairlines D/skia:---分配失敗的縮放位圖 08-24 09:54:34.335 16995-16995/com.example.m auricio.pairlines d/AndroidRuntime:關閉VM

                  --------- beginning of crash 

9月8日至24日:54:34.340 16995-16995/com.example.mauricio.pairlines E/AndroidRuntime:致命異常:主 過程:com。示例.mauricio.pairlines,PID:16995 java.lang.RuntimeException:無法啓動活動ComponentInfo {com.example.mauricio.pairlines/com.example.mauricio.pairlines.PasswordVerification}:android.view.InflateException:二進制XML文件行#2:錯誤在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2325) 處的類 上溢出android.app.ActivityThread.handleLaunchActivity(ActivityThread.ja va:2387) at android.app.ActivityThread.access $ 800(ActivityThread.java:151) at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler .java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method。調用(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:902) at com.android .internal.os.ZygoteInit.main(ZygoteInit.java:697) 引起:android.view.InflateException:二進制XML文件行#2:在android.view.LayoutInflater.createView(LayoutInflater.java:633)上膨脹類 時出錯) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682) at android.view.LayoutInflater.cr e.View.FromTag(LayoutInflater.java:741) at android.view.LayoutInflater.inflate(LayoutInflater.java:482) at android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate( LayoutInflater.java:365) 在android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) 在android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) 在COM。 example.mauricio.pairlines.PasswordVerification.onCreate(PasswordVerification.java:27) at android.app.Activity.performCreate(Activity.java:6033) at an droid.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) 在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) 在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) 在機器人。 app.ActivityThread.access $ 800(ActivityThread.java:151) at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android .os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Na tive方法) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:902) at com.android.internal .os.ZygoteInit.main(ZygoteInit.java:697) 由java.lang.reflect.Constructor.newInstance中的java.lang.reflect.Constructor.newInstance(Native Method) 引發:java.lang.reflect.InvocationTargetException (Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55) 在android.view.LayoutInflater.onCreateView(LayoutInflater.java:682) 在android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:741) 在android.view.LayoutInflater.inflate(LayoutInflater.java:482) 在android.view.LayoutInflater.inflate(LayoutInflater.java:414) at android.view.LayoutInflater.inflate(LayoutInflater.java:365) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.example.mauricio.pairlines.PasswordVerific通貨膨脹。onCreate(PasswordVerification.java:27) at android.app.Activity.performCreate(Activity.java:6033) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity( Activity.java:2278) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387) at android.app.ActivityThread.access $ 800(ActivityThread.java:151) at android.app.ActivityThread $ H.handleMessage (ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.ja va:135) at android.app.ActivityThread.main(ActivityThread.java:5254) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java :372) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:902) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697) 由java導致:java .lang.OutOfMemoryError:未能分配104530188字節分配,1048480空閒字節和95MB,直到OOM at dalvik.system.VMRuntime.newNonMovableArray(Native Method) at android.graphics.BitmapFactory.nativeDecodeAsset(Nativ E法) 在android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:608) 在android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:444) 在android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java :988) at android.content.res.Resdata.loadDrawableForCookie(Resources.java:2474) at android.content.res.Resources.loadDrawable(Resources.java:2381) at android.content.res.TypedArray.getDrawable (TypedArray.java:749) at android.view.View。(View.java:3741) at android.view.ViewGroup。(ViewGroup.java:498) (LinearLayout.java:200) at android.widget.LinearLayout。(LinearLayout.java:196) at android.widget.LinearLayout。(LinearLayout.java:192) at java.lang。(android.widget.LinearLayout。 reflect.Constructor.newInstance(Native Method) at java.lang.reflect.Constructor.newInstance(Constructor.java:288) at android.view.LayoutInflater.createView(LayoutInflater.java:607) at com.android.internal .policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:55) at android.view.LayoutInflater.onCreateView(LayoutInflater.java:682) at android.view.LayoutInfl ater.createViewFromTag(LayoutInflater.java:741) 在android.view.LayoutInflater.inflate(LayoutInflater.java:482) 在android.view.LayoutInflater.inflate(LayoutInflater.java:414) 在android.view.LayoutInflater。 inflate(LayoutInflater.java:365) at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:280) at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:140) at com.example.mauricio.pairlines.PasswordVerification.onCreate(PasswordVerification.java:27) at android.app.Activity.performCreate(Activity。java:6033) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java: 2387) at android.app.ActivityThread.access $ 800(ActivityThread.java:151) at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1303) at android.os.Handler.dispatchMessage(Handler.java :102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5254)(Method Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit .java:902) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:697) 08-24 09:54:34.669 16995-16995/com.example.mauricio.pairlines I/Process:Sending信號。 PID:16995 SIG:9

+0

'由於:java.lang.OutOfMemoryError:無法分配104530188字節分配您的資源中有100MB的圖像文件? – Michael

+0

@Michael我如何檢查? – Aimatos

+0

通過開發機器上的項目。當然你應該知道(或者很容易找出)你在這個活動的佈局中包含哪些資源。 – Michael

回答

0

它的固定,我只是在res文件夾中添加了4個文件夾,名爲drawable xhdpi,drawable hdpi,drawable mdpi和drawable ldpi,並將圖像移動到那裏,然後我將photoshop上的圖像重新設置爲72dpi xhdpi,3/4尺寸的hdpi,1/2英寸的mdpi和1/4英寸的ldpi。

相關問題