应用无法在模拟器

时间:2016-11-28 07:01:22

标签: android

E / AndroidRuntime:致命异常:主要                   过程:com.android.lewis.cspeedometer,PID:2337                   java.lang.RuntimeException:无法启动活动ComponentInfo {com.android.lewis.cspeedometer / com.android.lewis.cspeedometer.CSpeedometer}:android.content.ActivityNotFoundException:无法找到显式活动类{com.android.lewis。 cspeedometer / com.android.lewis.cspeedometer.PhoneCallReceiver};你有没有在AndroidManifest.xml中声明这个活动?                       在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2646)                       在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)                       在android.app.ActivityThread.-wrap12(ActivityThread.java)                       在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1460)                       在android.os.Handler.dispatchMessage(Handler.java:102)                       在android.os.Looper.loop(Looper.java:154)                       在android.app.ActivityThread.main(ActivityThread.java:6077)                       at java.lang.reflect.Method.invoke(Native Method)                       在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:865)                       在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755)                    引起:android.content.ActivityNotFoundException:无法找到显式活动类{com.android.lewis.cspeedometer / com.android.lewis.cspeedometer.PhoneCallReceiver};你有没有在AndroidManifest.xml中声明这个活动?                       在android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1805)                       在android.app.Instrumentation.execStartActivity(Instrumentation.java:1523)                       在android.app.Activity.startActivityForResult(Activity.java:4224)                       在android.app.Activity.startActivityForResult(Activity.java:4183)                       在android.app.Activity.startActivity(Activity.java:4507)                       在android.app.Activity.startActivity(Activity.java:4475)                       在com.android.lewis.cspeedometer.CSpeedometer.updateSpeed(CSpeedometer.java:114)                       在com.android.lewis.cspeedometer.CSpeedometer.onCreate(CSpeedometer.java:51)                       在android.app.Activity.performCreate(Activity.java:6662)                       在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118)                       在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599)                       在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2707)                       在android.app.ActivityThread.-wrap12(ActivityThread.java)                       在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1460)                       在android.os.Handler.dispatchMessage(Handler.java:102)                       在android.os.Looper.loop(Looper.java:154)                       在android.app.ActivityThread.main(ActivityThread.java:6077)                       at java.lang.reflect.Method.invoke(Native Method)                       在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:865)                       在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 断开与目标VM的连接,地址:'localhost:8619',transport:'socket'

1 个答案:

答案 0 :(得分:0)

  

您是否在AndroidManifest.xml中声明了此活动?

在Android中声明您的活动 像这样的主流

<activity android:name=".YourActivity"></activity>