多次点击后活动结束

时间:2018-04-13 20:24:27

标签: android android-layout android-gradle build.gradle android-view

每次我运行我的应用程序并且在点击下一个活动的15-16次之后我继续进行下一个活动,它说它将不幸地关闭。

I/art: Alloc sticky concurrent mark sweep GC freed 907(64KB) AllocSpace objects, 1(16KB) LOS objects, 0% free, 95MB/96MB, paused 701us total 8.300ms
I/art: Clamp target GC heap from 99MB to 96MB
I/art: Alloc partial concurrent mark sweep GC freed 248(18KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 95MB/96MB, paused 762us total 24.932ms
I/art: Clamp target GC heap from 99MB to 96MB
I/art: Alloc concurrent mark sweep GC freed 65(14KB) AllocSpace objects, 0(0B) LOS objects, 0% free, 95MB/96MB, paused 732us total 39.672ms
I/art: Forcing collection of SoftReferences for 4MB allocation
I/art: Clamp target GC heap from 99MB to 96MB
I/art: Alloc concurrent mark sweep GC freed 11(344B) AllocSpace objects, 0(0B) LOS objects, 0% free, 95MB/96MB, paused 732us total 37.811ms
**E/art: Throwing OutOfMemoryError "Failed to allocate a 4665612 byte allocation with 638544 free bytes and 623KB until OOM"**
I/art: Alloc sticky concurrent mark sweep GC freed 5(576B) AllocSpace objects, 0(0B) LOS objects, 0% free, 95MB/96MB, paused 671us total 5.065ms
I/art: Clamp target GC heap from 99MB to 96MB
I/art: Alloc partial concurrent mark sweep GC freed 6(192B) AllocSpace objects, 0(0B) LOS objects, 0% free, 95MB/96MB, paused 732us total 23.437ms
I/art: Clamp target GC heap from 99MB to 96MB
I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 95MB/96MB, paused 915us total 43.914ms
I/art: Forcing collection of SoftReferences for 4MB allocation
I/art: Clamp target GC heap from 99MB to 96MB
I/art: Alloc concurrent mark sweep GC freed 3(96B) AllocSpace objects, 0(0B) LOS objects, 0% free, 95MB/96MB, paused 701us total 37.811ms
**E/art: Throwing OutOfMemoryError "Failed to allocate a 4665612 byte allocation** with 638544 free bytes and 623KB until OOM"
D/skia: --- allocation failed for scaled bitmap
D/AndroidRuntime: Shutting down VM
**E/AndroidRuntime: FATAL EXCEPTION: main
                  Process: com.example.microsoft.drawit, PID: 840
                  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.microsoft.drawit/com.example.microsoft.drawit.letterO}: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3133)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3243)
                      at android.app.ActivityThread.access$1000(ActivityThread.java:218)
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718)
                      at android.os.Handler.dispatchMessage(Handler.java:102)
                      at android.os.Looper.loop(Looper.java:145)
                      at android.app.ActivityThread.main(ActivityThread.java:6917)
                      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:1404)
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
                   Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class <unknown>
                      at android.view.LayoutInflater.createView(LayoutInflater.java:640)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:415)
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:366)
                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287)
                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)
                      at com.example.microsoft.drawit.letterO.onCreate(letterO.java:17)
                      at android.app.Activity.performCreate(Activity.java:6609)
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134)
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3086)
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3243) 
                      at android.app.ActivityThread.access$1000(ActivityThread.java:218) 
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718) 
                      at android.os.Handler.dispatchMessage(Handler.java:102) 
                      at android.os.Looper.loop(Looper.java:145) 
                      at android.app.ActivityThread.main(ActivityThread.java:6917) 
                      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:1404) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 
                   Caused by: java.lang.reflect.InvocationTargetException
                      at java.lang.reflect.Constructor.newInstance(Native Method)
                      at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
                      at android.view.LayoutInflater.createView(LayoutInflater.java:614)
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:483) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:415) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:366) 
                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) 
                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
                      at com.example.microsoft.drawit.letterO.onCreate(letterO.java:17) 
                      at android.app.Activity.performCreate(Activity.java:6609) 
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134) 
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3086) 
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3243) 
                      at android.app.ActivityThread.access$1000(ActivityThread.java:218) 
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718) 
                      at android.os.Handler.dispatchMessage(Handler.java:102) 
                      at android.os.Looper.loop(Looper.java:145) 
                      at android.app.ActivityThread.main(ActivityThread.java:6917) 
                      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:1404) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) 
                   Caused by: java.lang.OutOfMemoryError: Failed to allocate a 4665612 byte allocation with 638544 free bytes and 623KB until OOM
                      at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
                      at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
                      at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:837)
                      at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:656)
                      at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1037)
                      at android.content.res.Resources.loadDrawableForCookie(Resources.java:4037)
                      at android.content.res.Resources.loadDrawable(Resources.java:3910)
                      at android.content.res.TypedArray.getDrawable(TypedArray.java:776)
                      at android.view.View.<init>(View.java:4001)
                      at android.view.ViewGroup.<init>(ViewGroup.java:513)
                      at android.view.ViewGroup.<init>(ViewGroup.java:509)
                      at android.view.ViewGroup.<init>(ViewGroup.java:505)
                      at android.support.constraint.ConstraintLayout.<init>(ConstraintLayout.java:419)
                      at java.lang.reflect.Constructor.newInstance(Native Method) 
                      at java.lang.reflect.Constructor.newInstance(Constructor.java:288) 
                      at android.view.LayoutInflater.createView(LayoutInflater.java:614) 
                      at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:750) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:483) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:415) 
                      at android.view.LayoutInflater.inflate(LayoutInflater.java:366) 
                      at android.support.v7.app.AppCompatDelegateImplV9.setContentView(AppCompatDelegateImplV9.java:287) 
                      at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139) 
                      at com.example.microsoft.drawit.letterO.onCreate(letterO.java:17) 
                      at android.app.Activity.performCreate(Activity.java:6609) 
                      at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134) 
                      at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3086) 
                      at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3243) 
                      at android.app.ActivityThread.access$1000(ActivityThread.java:218) 
                      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1718) 
                      at android.os.Handler.dispatchMessage(Handler.java:102) 
                      at android.os.Looper.loop(Looper.java:145) 
                      at android.app.ActivityThread.main(ActivityThread.java:6917) 
                      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:1404) 
                      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)** 
I/Process: Sending signal. PID: 840 SIG: 9

0 个答案:

没有答案