android.content.ActivityNotFoundException: No Activity found to handle Intent

lppq199192 2013-03-06 11:32:57
public void onClick(View v) {
// TODO Auto-generated method stub
// System.out.println("fadfadf");
// Log.i(tag, "被点击了!!!!");
EditText myedit = (EditText) MainActivity.this.findViewById(R.id.et_number);
String number = myedit.getText().toString();
Log.i(tag,number);
//接下来就要拨打这个电话号码
Intent intent2 = new Intent();//意图:代表一个动作
//拨打动作,110代表一个数据
intent2.setAction(Intent.ACTION_CALL);
intent2.setData(Uri.parse("tel"+number));
//安卓里所有界面的激活都是通过意图来激活的
startActivity(intent2);
}


<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.zwb.phone.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>

这是配置文件。。。找了半天还找不到哪里错了。。
...全文
672 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
c16882599 2013-03-06
  • 打赏
  • 举报
回复
tel后面加个冒号试试 intent2.setData(Uri.parse("tel:"+number));

80,350

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧