![](/img/trans.png)
[英]Unfortunately HelloWorld Stopped (My app stopped on emulator: Unfortunately )
[英]My program when rum on emulator it says “unfortunately stopped”
嘿,我正在做一个基本程序,如果我使用setContentView(R.layout.yoyo)
“ yoyo我的mp3文件名”,我想在setContentView
文件中添加一个mp3文件,但实际上我在“ lib”中创建了一个子文件夹“”作为“原始”,其中放置了我的mp3文件“ yoyo”。 所以我给了setContentView(R.raw.yoyo)错误消失了,但是当我在模拟器中刺激时出现了错误
Installation failed due to invalid URI!
[2014-07-26 11:35:49 - Firstone] Please check logcat output for more details.
[2014-07-26 11:35:50 - Firstone] Launch canceled!
我的原木猫放了
07-26 18:52:15.958: W/ActivityManager(1263): Activity destroy timeout for ActivityRecord{b2209a10 u0 com.firstone/.Splash t7 f}
07-26 18:52:34.779: W/linker(1756): libdvm.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-26 18:52:36.829: E/memtrack(1756): Couldn't load memtrack module (No such file or directory)
07-26 18:52:36.829: E/android.os.Debug(1756): failed to load memtrack module: -2
07-26 18:52:38.489: W/linker(1767): libdvm.so has text relocations. This is wasting memory and prevents security hardening. Please fix.
07-26 18:52:40.319: E/memtrack(1767): Couldn't load memtrack module (No such file or directory)
07-26 18:52:40.319: E/android.os.Debug(1767): failed to load memtrack module: -2
07-26 18:52:41.219: I/ActivityManager(1263): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.firstone/.Splash} from pid 1767 on display 0
07-26 18:52:41.719: E/libEGL(938): called unimplemented OpenGL ES API
07-26 18:52:41.729: E/libEGL(938): called unimplemented OpenGL ES API
07-26 18:52:41.729: E/libEGL(938): called unimplemented OpenGL ES API
07-26 18:52:41.729: E/libEGL(938): called unimplemented OpenGL ES API
07-26 18:52:41.729: E/SurfaceFlinger(938): glCheckFramebufferStatusOES error 779177132
07-26 18:52:41.729: E/SurfaceFlinger(938): got GL_FRAMEBUFFER_COMPLETE_OES error while taking screenshot
07-26 18:52:41.729: E/libEGL(938): called unimplemented OpenGL ES API
07-26 18:52:41.729: E/libEGL(938): called unimplemented OpenGL ES API
07-26 18:52:41.879: W/WindowManager(1263): Screenshot failure taking screenshot for (123x164) to layer 21000
07-26 18:52:42.119: I/Choreographer(1263): Skipped 809 frames! The application may be doing too much work on its main thread.
07-26 18:52:42.289: I/Choreographer(1263): Skipped 203 frames! The application may be doing too much work on its main thread.
07-26 18:52:42.459: I/Choreographer(1263): Skipped 142 frames! The application may be doing too much work on its main thread.
07-26 18:52:42.699: I/Choreographer(1263): Skipped 267 frames! The application may be doing too much work on its main thread.
07-26 18:52:42.799: I/Choreographer(1263): Skipped 92 frames! The application may be doing too much work on its main thread.
07-26 18:52:42.989: I/Choreographer(1263): Skipped 31 frames! The application may be doing too much work on its main thread.
07-26 18:52:43.219: I/Choreographer(1263): Skipped 30 frames! The application may be doing too much work on its main thread.
07-26 18:52:43.399: I/Choreographer(1263): Skipped 30 frames! The application may be doing too much work on its main thread.
07-26 18:52:43.519: E/Region(938): Region::boolean_operation(op=7) invalid Rect={60,-10,180,-170}
07-26 18:52:51.949: W/ActivityManager(1263): Launch timeout has expired, giving up wake lock!
07-26 18:52:52.119: E/WindowManager(1263): Starting window AppWindowToken{b20e20d0 token=Token{b22a9080 ActivityRecord{b20e1c08 u0 com.firstone/.Splash t8}}} timed out
我的JAVA代码是
package com.firstone;
import android.app.Activity;
import android.os.Bundle;
public class Splash extends Activity {
@Override
protected void onCreate(Bundle GaryNeeds) {
// TODO Auto-generated method stub
super.onCreate(GaryNeeds);
setContentView(R.raw.yoyo);
}
}
我的XML代码是
setContentView应该与R.layout中的值一起使用。 您不能将其与R.raw一起使用。
阅读以下文档:
http://developer.android.com/reference/android/app/Activity.html#setContentView(int)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.