1

例外

04-26 11:36:26.216: E/AndroidRuntime(953): FATAL EXCEPTION: main
04-26 11:36:26.216: E/AndroidRuntime(953): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.DIAL dat=(09015369067 }
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1622)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.app.Instrumentation.execStartActivity(Instrumentation.java:1417)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.app.Activity.startActivityForResult(Activity.java:3370)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.app.Activity.startActivityForResult(Activity.java:3331)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.app.Activity.startActivity(Activity.java:3566)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.app.Activity.startActivity(Activity.java:3534)
04-26 11:36:26.216: E/AndroidRuntime(953):  at com.example.buildintent.MainActivity$1.onClick(MainActivity.java:25)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.view.View.performClick(View.java:4202)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.view.View$PerformClick.run(View.java:17340)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.os.Handler.handleCallback(Handler.java:725)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.os.Handler.dispatchMessage(Handler.java:92)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.os.Looper.loop(Looper.java:137)
04-26 11:36:26.216: E/AndroidRuntime(953):  at android.app.ActivityThread.main(ActivityThread.java:5039)
04-26 11:36:26.216: E/AndroidRuntime(953):  at java.lang.reflect.Method.invokeNative(Native Method)
04-26 11:36:26.216: E/AndroidRuntime(953):  at java.lang.reflect.Method.invoke(Method.java:511)
04-26 11:36:26.216: E/AndroidRuntime(953):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
04-26 11:36:26.216: E/AndroidRuntime(953):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
04-26 11:36:26.216: E/AndroidRuntime(953):  at dalvik.system.NativeStart.main(Native Method)
4

2 回答 2

0

确保它在清单文件中的应用程序标记下定义

于 2013-04-26T11:49:13.663 回答
0

请在清单文件中添加权限,

<uses-permission android:name="android.permission.CALL_PHONE"></uses-permission>   

并发起呼叫,如下面的代码所示,

Intent callIntent = new Intent(Intent.ACTION_CALL);
callIntent.setData(Uri.parse("tel:9015369067"));
startActivity(callIntent);

我希望它会有所帮助!

于 2013-04-26T11:50:25.023 回答