android开发程序没有错运行出现unfortunately
01-1510:48:51.308:D/gralloc_goldfish(1299):EmulatorwithoutGPUemulationdetected.01-151...
01-15 10:48:51.308: D/gralloc_goldfish(1299): Emulator without GPU emulation detected.
01-15 10:48:54.178: D/AndroidRuntime(1299): Shutting down VM
01-15 10:48:54.178: W/dalvikvm(1299): threadid=1: thread exiting with uncaught exception (group=0xb3a96b90)
01-15 10:48:54.248: E/AndroidRuntime(1299): FATAL EXCEPTION: main
01-15 10:48:54.248: E/AndroidRuntime(1299): Process: com.wes.people, PID: 1299
01-15 10:48:54.248: E/AndroidRuntime(1299): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.wes.people/com.wes.people.input}; have you declared this activity in your AndroidManifest.xml?
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Activity.startActivityForResult(Activity.java:3423)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Activity.startActivityForResult(Activity.java:3384)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Activity.startActivity(Activity.java:3626)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Activity.startActivity(Activity.java:3594)
01-15 10:48:54.248: E/AndroidRuntime(1299): at com.wes.people.login$2.onClick(login.java:53)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.view.View.performClick(View.java:4424)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.view.View$PerformClick.run(View.java:18383)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.os.Handler.handleCallback(Handler.java:733)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.os.Handler.dispatchMessage(Handler.java:95)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.os.Looper.loop(Looper.java:137)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.ActivityThread.main(ActivityThread.java:4998)
01-15 10:48:54.248: E/AndroidRuntime(1299): at java.lang.reflect.Method.invokeNative(Native Method)
01-15 10:48:54.248: E/AndroidRuntime(1299): at java.lang.reflect.Method.invoke(Method.java:515)
01-15 10:48:54.248: E/AndroidRuntime(1299): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
01-15 10:48:54.248: E/AndroidRuntime(1299): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
01-15 10:48:54.248: E/AndroidRuntime(1299): at dalvik.system.NativeStart.main(Native Method)
01-15 10:48:57.568: I/Process(1299): Sending signal. PID: 1299 SIG: 9 展开
01-15 10:48:54.178: D/AndroidRuntime(1299): Shutting down VM
01-15 10:48:54.178: W/dalvikvm(1299): threadid=1: thread exiting with uncaught exception (group=0xb3a96b90)
01-15 10:48:54.248: E/AndroidRuntime(1299): FATAL EXCEPTION: main
01-15 10:48:54.248: E/AndroidRuntime(1299): Process: com.wes.people, PID: 1299
01-15 10:48:54.248: E/AndroidRuntime(1299): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.wes.people/com.wes.people.input}; have you declared this activity in your AndroidManifest.xml?
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1628)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Instrumentation.execStartActivity(Instrumentation.java:1424)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Activity.startActivityForResult(Activity.java:3423)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Activity.startActivityForResult(Activity.java:3384)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Activity.startActivity(Activity.java:3626)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.Activity.startActivity(Activity.java:3594)
01-15 10:48:54.248: E/AndroidRuntime(1299): at com.wes.people.login$2.onClick(login.java:53)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.view.View.performClick(View.java:4424)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.view.View$PerformClick.run(View.java:18383)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.os.Handler.handleCallback(Handler.java:733)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.os.Handler.dispatchMessage(Handler.java:95)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.os.Looper.loop(Looper.java:137)
01-15 10:48:54.248: E/AndroidRuntime(1299): at android.app.ActivityThread.main(ActivityThread.java:4998)
01-15 10:48:54.248: E/AndroidRuntime(1299): at java.lang.reflect.Method.invokeNative(Native Method)
01-15 10:48:54.248: E/AndroidRuntime(1299): at java.lang.reflect.Method.invoke(Method.java:515)
01-15 10:48:54.248: E/AndroidRuntime(1299): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:777)
01-15 10:48:54.248: E/AndroidRuntime(1299): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:593)
01-15 10:48:54.248: E/AndroidRuntime(1299): at dalvik.system.NativeStart.main(Native Method)
01-15 10:48:57.568: I/Process(1299): Sending signal. PID: 1299 SIG: 9 展开
2015-01-15
展开全部
看着没有问题 发log截图吧
import org.cocos2d.layers.CCLayer;
import org.cocos2d.layers.CCScene;
import org.cocos2d.nodes.CCDirector;
import org.cocos2d.opengl.CCGLSurfaceView;
import android.app.Activity;
import android.os.Bundle;
public class GameActivity extends Activity {
private CCGLSurfaceView view = null;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
view = new CCGLSurfaceView(this);
setContentView(view);
// 得到CCdirector 对象(导演)
CCDirector director = CCDirector.sharedDirector();
// 设置管理的view
director.attachInView(view);
// 设置显示帧数
director.setDisplayFPS(true);
// 设置游戏帧数
director.setAnimationInterval(1 / 30.0);
// 生成游戏场景对象
CCScene scene = CCScene.node();
// 生成图层对象
GameLayer gamelayer = new GameLayer();
// 将图层加入到场景中
scene.addChild(gamelayer);
// 运行游戏场景
director.runWithScene(scene);
}
static class GameLayer extends CCLayer {
}
}
这个我测了 可以运行
==============================================
if (savedInstanceState == null) {
getFragmentManager().beginTransaction()
.add(R.id.container, new PlaceholderFragment()).commit();
}
这段代码的问题吧
import org.cocos2d.layers.CCLayer;
import org.cocos2d.layers.CCScene;
import org.cocos2d.nodes.CCDirector;
import org.cocos2d.opengl.CCGLSurfaceView;
import android.app.Activity;
import android.os.Bundle;
public class GameActivity extends Activity {
private CCGLSurfaceView view = null;
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
view = new CCGLSurfaceView(this);
setContentView(view);
// 得到CCdirector 对象(导演)
CCDirector director = CCDirector.sharedDirector();
// 设置管理的view
director.attachInView(view);
// 设置显示帧数
director.setDisplayFPS(true);
// 设置游戏帧数
director.setAnimationInterval(1 / 30.0);
// 生成游戏场景对象
CCScene scene = CCScene.node();
// 生成图层对象
GameLayer gamelayer = new GameLayer();
// 将图层加入到场景中
scene.addChild(gamelayer);
// 运行游戏场景
director.runWithScene(scene);
}
static class GameLayer extends CCLayer {
}
}
这个我测了 可以运行
==============================================
if (savedInstanceState == null) {
getFragmentManager().beginTransaction()
.add(R.id.container, new PlaceholderFragment()).commit();
}
这段代码的问题吧
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询