简体   繁体   English

Android应用程序错误打开跟踪文件:没有此类文件或目录

[英]Android application Error Opening Trace File: No such file or directory

Here is a link to a question i posted before with my code: 这是我以前用我的代码发布的问题的链接:

https://stackoverflow.com/questions/22277864/grid-view-open-one-layout-form-another-causes-the-prograam-to-crash https://stackoverflow.com/questions/22277864/grid-view-open-one-layout-form-another-causes-the-prograam-to-crash

The error happens right as I click on the button2 'Ornaments' on the main form . 当我单击主窗体上的button2'装饰品'时,错误就发生了。

Log Cat: 日志猫:

03-09 10:08:20.308: E/Trace(640): error opening trace file: No such file or directory (2)
03-09 10:08:21.158: D/libEGL(640): loaded /system/lib/egl/libEGL_emulation.so
03-09 10:08:21.158: D/(640): HostConnection::get() New Host Connection established 0x2a072918, tid 640
03-09 10:08:21.218: D/libEGL(640): loaded /system/lib/egl/libGLESv1_CM_emulation.so
03-09 10:08:21.229: D/libEGL(640): loaded /system/lib/egl/libGLESv2_emulation.so
03-09 10:08:21.338: W/EGL_emulation(640): eglSurfaceAttrib not implemented
03-09 10:08:21.378: D/OpenGLRenderer(640): Enabling debug mode 0
03-09 10:08:26.648: D/dalvikvm(640): GC_FOR_ALLOC freed 125K, 3% free 8250K/8455K, paused 118ms, total 130ms
03-09 10:08:26.648: I/dalvikvm-heap(640): Forcing collection of SoftReferences for 31961104-byte allocation
03-09 10:08:26.838: D/dalvikvm(640): GC_BEFORE_OOM freed 13K, 3% free 8236K/8455K, paused 184ms, total 185ms
03-09 10:08:26.838: E/dalvikvm-heap(640): Out of memory on a 31961104-byte allocation.
03-09 10:08:26.838: I/dalvikvm(640): "main" prio=5 tid=1 RUNNABLE
03-09 10:08:26.848: I/dalvikvm(640):   | group="main" sCount=0 dsCount=0 obj=0x40a14568 self=0x2a00b9e0
03-09 10:08:26.848: I/dalvikvm(640):   | sysTid=640 nice=0 sched=0/0 cgrp=apps handle=1073870640
03-09 10:08:26.848: I/dalvikvm(640):   | schedstat=( 1310216641 1726854966 299 ) utm=92 stm=39 core=0
03-09 10:08:26.858: I/dalvikvm(640):   at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
03-09 10:08:26.858: I/dalvikvm(640):   at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
03-09 10:08:26.858: I/dalvikvm(640):   at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
03-09 10:08:26.873: I/dalvikvm(640):   at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
03-09 10:08:26.878: I/dalvikvm(640):   at android.content.res.Resources.loadDrawable(Resources.java:1930)
03-09 10:08:26.878: I/dalvikvm(640):   at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
03-09 10:08:26.878: I/dalvikvm(640):   at android.widget.ImageView.<init>(ImageView.java:120)
03-09 10:08:26.878: I/dalvikvm(640):   at android.widget.ImageView.<init>(ImageView.java:110)
03-09 10:08:26.878: I/dalvikvm(640):   at java.lang.reflect.Constructor.constructNative(Native Method)
03-09 10:08:26.878: I/dalvikvm(640):   at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
03-09 10:08:26.878: I/dalvikvm(640):   at android.view.LayoutInflater.createView(LayoutInflater.java:587)
03-09 10:08:26.888: I/dalvikvm(640):   at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
03-09 10:08:26.888: I/dalvikvm(640):   at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
03-09 10:08:26.888: I/dalvikvm(640):   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
03-09 10:08:26.888: I/dalvikvm(640):   at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
03-09 10:08:26.888: I/dalvikvm(640):   at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
03-09 10:08:26.888: I/dalvikvm(640):   at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
03-09 10:08:26.898: I/dalvikvm(640):   at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
03-09 10:08:26.898: I/dalvikvm(640):   at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
03-09 10:08:26.898: I/dalvikvm(640):   at android.app.Activity.setContentView(Activity.java:1867)
03-09 10:08:26.898: I/dalvikvm(640):   at edu.ajh161.designs.Ornaments.onCreate(Ornaments.java:13)
03-09 10:08:26.898: I/dalvikvm(640):   at android.app.Activity.performCreate(Activity.java:5008)
03-09 10:08:26.910: I/dalvikvm(640):   at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
03-09 10:08:26.910: I/dalvikvm(640):   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
03-09 10:08:26.910: I/dalvikvm(640):   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
03-09 10:08:26.910: I/dalvikvm(640):   at android.app.ActivityThread.access$600(ActivityThread.java:130)
03-09 10:08:26.910: I/dalvikvm(640):   at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
03-09 10:08:26.910: I/dalvikvm(640):   at android.os.Handler.dispatchMessage(Handler.java:99)
03-09 10:08:26.910: I/dalvikvm(640):   at android.os.Looper.loop(Looper.java:137)
03-09 10:08:26.918: I/dalvikvm(640):   at android.app.ActivityThread.main(ActivityThread.java:4745)
03-09 10:08:26.918: I/dalvikvm(640):   at java.lang.reflect.Method.invokeNative(Native Method)
03-09 10:08:26.918: I/dalvikvm(640):   at java.lang.reflect.Method.invoke(Method.java:511)
03-09 10:08:26.918: I/dalvikvm(640):   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-09 10:08:26.918: I/dalvikvm(640):   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-09 10:08:26.918: I/dalvikvm(640):   at dalvik.system.NativeStart.main(Native Method)
03-09 10:08:26.928: D/skia(640): --- decoder->decode returned false
03-09 10:08:26.948: D/AndroidRuntime(640): Shutting down VM
03-09 10:08:26.958: W/dalvikvm(640): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
03-09 10:08:27.138: E/AndroidRuntime(640): FATAL EXCEPTION: main
03-09 10:08:27.138: E/AndroidRuntime(640): java.lang.RuntimeException: Unable to start activity ComponentInfo{edu.ajh161.designs/edu.ajh161.designs.Ornaments}: android.view.InflateException: Binary XML file line #34: Error inflating class <unknown>
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.ActivityThread.access$600(ActivityThread.java:130)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.os.Handler.dispatchMessage(Handler.java:99)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.os.Looper.loop(Looper.java:137)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.ActivityThread.main(ActivityThread.java:4745)
03-09 10:08:27.138: E/AndroidRuntime(640):  at java.lang.reflect.Method.invokeNative(Native Method)
03-09 10:08:27.138: E/AndroidRuntime(640):  at java.lang.reflect.Method.invoke(Method.java:511)
03-09 10:08:27.138: E/AndroidRuntime(640):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
03-09 10:08:27.138: E/AndroidRuntime(640):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
03-09 10:08:27.138: E/AndroidRuntime(640):  at dalvik.system.NativeStart.main(Native Method)
03-09 10:08:27.138: E/AndroidRuntime(640): Caused by: android.view.InflateException: Binary XML file line #34: Error inflating class <unknown>
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.view.LayoutInflater.createView(LayoutInflater.java:613)
03-09 10:08:27.138: E/AndroidRuntime(640):  at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
03-09 10:08:27.138: E/AndroidRuntime(640):  at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.Activity.setContentView(Activity.java:1867)
03-09 10:08:27.138: E/AndroidRuntime(640):  at edu.ajh161.designs.Ornaments.onCreate(Ornaments.java:13)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.Activity.performCreate(Activity.java:5008)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
03-09 10:08:27.138: E/AndroidRuntime(640):  ... 11 more
03-09 10:08:27.138: E/AndroidRuntime(640): Caused by: java.lang.reflect.InvocationTargetException
03-09 10:08:27.138: E/AndroidRuntime(640):  at java.lang.reflect.Constructor.constructNative(Native Method)
03-09 10:08:27.138: E/AndroidRuntime(640):  at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.view.LayoutInflater.createView(LayoutInflater.java:587)
03-09 10:08:27.138: E/AndroidRuntime(640):  ... 24 more
03-09 10:08:27.138: E/AndroidRuntime(640): Caused by: java.lang.OutOfMemoryError
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:353)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:781)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.content.res.Resources.loadDrawable(Resources.java:1930)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.widget.ImageView.<init>(ImageView.java:120)
03-09 10:08:27.138: E/AndroidRuntime(640):  at android.widget.ImageView.<init>(ImageView.java:110)
03-09 10:08:27.138: E/AndroidRuntime(640):  ... 27 more
03-09 10:08:31.238: I/Process(640): Sending signal. PID: 640 SIG: 9

Here, you are getting 3 Exceptions: 在这里,您将获得3个例外:

android.view.InflateException
java.lang.reflect.InvocationTargetException
java.lang.OutOfMemoryError

The problem starts to occurring from OutOfMemoryError Exception . 问题开始于OutOfMemoryError Exception The drawable , you are trying to set in the ImageView with the id imageview2 , may be too large. 您尝试在id为imageview2ImageView设置的drawable可能太大。 So, when system trying to process that drawable it exceeds memory limit...then OutOfMemoryError Exception occurring. 因此,当系统尝试处理该drawable它超出了内存限制...然后发生OutOfMemoryError Exception

Since, due to the OutOfMemoryError , system can't set that drawable to tha ImageView then its throwing other Exceptions as InvocationTargetException and InflateException . 由于由于OutOfMemoryError ,系统无法将drawable设置为ImageView因此它会InflateException其他Exceptions例如InvocationTargetExceptionInflateException

Now, try to reduce the drawable's size...may be your problem will be solved. 现在,尝试减小drawable's大小...可能会解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Android - 错误打开跟踪文件:没有这样的文件或目录 - Android - error opening trace file: No such file or directory Android E / Trace(627):打开跟踪文件时出错:没有这样的文件或目录(2) - Android E/Trace(627): error opening trace file: No such file or directory (2) Android运行时错误:打开跟踪文件时出错:没有这样的文件或目录(2) - Android runtime error: error opening trace file: No such file or directory (2) Android-错误打开跟踪文件,没有这样的文件或目录 - Android-Error opening trace file no such file or directory Android上的JDom:打开跟踪文件时出错:没有这样的文件或目录 - JDom on Android: error opening trace file: No such file or directory Android错误打开跟踪文件 - Android Error opening trace file 打开跟踪文件时出错:没有这样的文件或目录(2) - error opening trace file: No such file or directory (2) 打开跟踪文件时出错:没有这样的文件或目录(2),解决方案? - error opening trace file: No such file or directory (2), Solution? 打开跟踪文件时出错。 没有这样的文件或目录[2] - Error opening trace file. No such file or directory [2] HttpURLConnection打开跟踪文件时出错:没有这样的文件或目录 - HttpURLConnection Error opening trace file: no such file or directory
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM