使用android studio中遇到的常见问题及解决方法
来源:互联网 发布:快速傅里叶变换算法 编辑:程序博客网 时间:2024/06/06 01:52
软件环境:android studio
记录一下自己使用android studio过程中遇到的问题和解决方案
Question 1: "cannot resolve symbol R"
解决方法:Build -> Clean Project
Question 2:"NumberFormatException: Invalid revision: 24.0.0-alpha1"
解决方法:
找到Android sdk安装目录
在sdk/extras/android/m2repository/com/android/support/appcompat-v7文件夹中删除 24.0.0-alpha1 文件夹
并在sdk/extras/android/m2repository/com/android/support/appcompat-v7/maven-metadata.xml文件中删<version>24.0.0-alpha1</version>
这一行
Question 3:“Cannot reload AVD list: cvc-enumeration-valid: Value '280dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.Error parsing D:\sdkforas\android-sdk-windows\system-images\android-22\android-wear\armeabi-v7a\devices.xmlcvc-enumeration-valid: Value '280dpi' is not facet-valid with respect to enumeration '[ldpi, mdpi, tvdpi, hdpi, xhdpi, 400dpi, xxhdpi, 560dpi, xxxhdpi]'. It must be a value from the enumeration.Error parsing D:\sdkforas\android-sdk-windows\system-images\android-22\android-wear\x86\devices.xml”
解决方法:
找到Android sdk安装目录
用/sdk/tools/lib/devices.xml
替换 system-images\android-22\android-wear\x86\devices.xml
再替换 system-images\android-22\android-wear\armeabi-v7a\devices.xml
Question 4:"can not resolve maketext() method of Toast"
Toast.makeText(this,"start" ,Toast.LENGTH_LONG).show();
error: java: no suitable method found for makeText(idtech.ESDN.ShapeData,java.lang.CharSequence,int) method android.widget.Toast.makeText(android.content.Context,int,int) is not applicable (actual argument idtech.ESDN.ShapeData cannot be converted to android.content.Context by method invocation conversion) method android.widget.Toast.makeText(android.content.Context,java.lang.CharSequence,int) is not applicable (actual argument idtech.ESDN.ShapeData cannot be converted to android.content.Context by method invocation conversion)
解决方法:
改为: Toast.makeText(getApplicationContext()
,"start" ,Toast.LENGTH_LONG).show();
- 使用android studio中遇到的常见问题及解决方法
- Android Studio中配置AndroidAnnotations,遇到的问题及解决方法
- Android Studio中配置AndroidAnnotations,遇到的问题及解决方法
- 使用Android studio 遇到的问题及解决方法
- 使用Android Studio时遇到的两个问题及解决方法
- Android Studio 使用中遇到的一些问题以及解决方法
- Android studio 遇到的常见问题
- Android Studio项目构建时遇到的常见问题及解决办法
- Storm过程中遇到的一些常见问题及解决方法
- 使用数位板遇到的常见问题及解决方法
- 使用Android Studio遇到的一些常见问题总结
- 安装Mysql遇到的常见问题及解决方法
- Android Studio使用过程中常见问题及解决方案
- Android Studio使用过程中常见问题及解决方案
- Android Studio安装遇到的问题及解决方法汇总
- 安装Android Studio遇到的问题及解决方法
- Eclipse工程导入Android Studio遇到的问题及解决方法
- Android Studio使用过程中遇到的问题(一)-- "value 2"异常解决方法
- anjularjs 学习1
- COGS 2123. [HZOI 2015] Glass Beads
- 基于CentOS6.6搭建LNMP服务器环境
- HDU1233 还是畅通工程 【最小生成树】
- Jenkins自动部署到Tomcat随机失败的问题
- 使用android studio中遇到的常见问题及解决方法
- ARM基础 六、ARM指令集
- Android 深入理解Android中的自定义属性(转载)
- 2706:麦森数
- 前端技能练习:span 标签的width 和 height
- 缓存更新策略
- codevs动态规划 选菜
- 对数组名取地址 a[ ],&a
- FORALL 之 SAVE EXCEPTIONS子句应用一例