简体   繁体   中英

Runtime error while usb debugging Android

I am learning how to build android apps, this is an app that I am working on as I go through the developer training. The app has been running fine on my android until I tried to add the action bar. Now the app crashes each time I try to start it. There seem to be no errors in my java source file.

Log Cat gives me theses errors:

04-30 18:17:28.268: E/Trace(19822): error opening trace file: No such file or directory (2)
04-30 18:17:29.565: D/libEGL(19822): loaded /vendor/lib/egl/libEGL_POWERVR_SGX540_120.so
04-30 18:17:29.917: D/libEGL(19822): loaded /vendor/lib/egl/libGLESv1_CM_POWERVR_SGX540_120.so
04-30 18:17:29.925: D/libEGL(19822): loaded /vendor/lib/egl/libGLESv2_POWERVR_SGX540_120.so
04-30 18:17:30.253: D/OpenGLRenderer(19822): Enabling debug mode 0
04-30 18:17:30.378: W/Resources(19822): Converting to string: TypedValue{t=0x12/d=0x0 a=2 r=0x7f050007}
04-30 18:17:30.659: D/AndroidRuntime(19822): Shutting down VM
04-30 18:17:30.659: W/dalvikvm(19822): threadid=1: thread exiting with uncaught exception (group=0x41d0f2a0)
04-30 18:17:31.393: E/AndroidRuntime(19822): FATAL EXCEPTION: main
04-30 18:17:31.393: E/AndroidRuntime(19822): android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x12/d=0x0 a=2 r=0x7f020001}

.....

I have uninstalled and re-installed the app onto my phone with no difference. All of my drawable files are in the res/ directory.

Here is the source code for the action bar:

/* this method is the onCreate for the action buttons in the actionbar */
@Override
public boolean onCreateOptionsMenu(Menu menu) {

    // this MenuInflater object inflates menu items for use in action bar
    MenuInflater inflater = getMenuInflater();
    inflater.inflate(R.menu.main_activity_actions, menu);

    return super.onCreateOptionsMenu(menu);
}

我发现了这个问题,我试图访问一个不存在或被误删除的.png文件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM