Android 开发遇见的所有错误记录
2014-12-13 22:13
162 查看
1. FATAL EXCEPTION: AsyncTask #1 doInBackground()
原因:select语句拼写错误
如:String select = "((" + Contacts.DISPLAY_NAME + "NOTNULL ) AND (" + Contacts.DISPLAY_NAME + " != '' ))";将会报错 FATAL EXCEPTION: AsyncTask #1 doInBackground()
修改为String select = "((" + Contacts.DISPLAY_NAME + " NOTNULL ) AND (" + Contacts.DISPLAY_NAME + " != '' ))";错误消失
解释: select语句中需要使用空格隔开 Contacts.DISPLAY_NAME等表达式和语句NOTNULL等。
2. android 报错: error: Apostrophe not preceded by \
原因 xml 不支持 ' 修改we'll 为 we will 或 we\'ll
3. Caused by: java.lang.NoSuchMethodError: android.view.View.getTransitionName
原因:getTransitionName()方法为API21加入的。故出现NoSuchMehtodError
遇见此错误查看当前手机是否支持调用的api, 官方API文档每个方法右上角标注了api添加的版本。
关于
@SuppressLint("NewApi") 或者 @TargeApi(9)区别和注意事项
参见
http://blog.csdn.net/geekpark/article/details/39931683
原因:select语句拼写错误
如:String select = "((" + Contacts.DISPLAY_NAME + "NOTNULL ) AND (" + Contacts.DISPLAY_NAME + " != '' ))";将会报错 FATAL EXCEPTION: AsyncTask #1 doInBackground()
修改为String select = "((" + Contacts.DISPLAY_NAME + " NOTNULL ) AND (" + Contacts.DISPLAY_NAME + " != '' ))";错误消失
解释: select语句中需要使用空格隔开 Contacts.DISPLAY_NAME等表达式和语句NOTNULL等。
2. android 报错: error: Apostrophe not preceded by \
原因 xml 不支持 ' 修改we'll 为 we will 或 we\'ll
3. Caused by: java.lang.NoSuchMethodError: android.view.View.getTransitionName
原因:getTransitionName()方法为API21加入的。故出现NoSuchMehtodError
遇见此错误查看当前手机是否支持调用的api, 官方API文档每个方法右上角标注了api添加的版本。
关于
@SuppressLint("NewApi") 或者 @TargeApi(9)区别和注意事项
参见
http://blog.csdn.net/geekpark/article/details/39931683
相关文章推荐
- 记录我在百度地图开发和ArcGIS for Android开发时出现的一些错误及解决方案(后续更新)
- 【Android应用开发】Android Studio 错误集锦 -- 将所有的 AS 错误集合到本文
- 输出Bag中的所有记录为一个json数组---精通android、IOS App应用服务程序开发
- Android开发错误记录:MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
- Android开发容易忽略的小错误记录整理
- Android开发错误记录之打包出错
- Android DNK开发错误记录
- 学习android过程遇见的错误记录
- 【Android应用开发】Android Studio 错误集锦 -- 将所有的 AS 错误集合到本文
- Android开发遇见错误
- android开发笔记------错误处理记录
- 【Android应用开发】Android Studio 错误集锦 -- 将所有的 AS 错误集合到本文
- android-studio开发NDK错误记录:bash: ../../build/intermediates/classes/debug: is a directory
- 输出Bag中的所有记录为一个只有值的json数组---精通android、IOS App应用服务程序开发
- android 软件开发错误-解决记录
- 记录android开发常见的错误
- android studio ndk开发中错误记录求救
- Android开发环境搭建过程记录
- eclipse android开发如何查看错误
- ubuntu下android开发环境搭建(及错误异常处理)