Android遇到的异常及解决方法

1、Warning: Activity not started, its current task has been brought to the front

 

      解:退出模拟器中的应用程序,然后再重启程序!

 

2、在添加环境变量的时候发现Tools目录下没有adb.exe文件!所以无法使用命令行

 

      解:发现较新版本的SDK的adb.exe文件在platform-tools文件夹里面

 

3、在命令行输入adb shell命令时提示错误:error : adb shell device not found

 

      解:开启相应版本的模拟器或者是连接到手机就可以了!

 

4、在接收短消息广播的时候出错: requires android.permission.RECEIVE_SMS due to sendercom.android.phone

 

      解:需要在manifest配置一句话:<uses-permission android:name="android.permission.RECEIVE_SMS"/>

你可能感兴趣的:(android)