码迷,mamicode.com
首页 > 移动开发 > 详细

Android报错

时间:2015-07-12 19:02:04      阅读:187      评论:0      收藏:0      [点我收藏+]

标签:android   错误   

1. Starting emulator for AVD ‘new‘
    emulator: ERROR: x86 emulation currently requires hardware acceleration!
    Please ensure Intel HAXM is properly installed and usable.
    CPU acceleration status: HAX kernel module is not installed!
发生情景:
创建 Android 模拟器,模拟器 CPU 处理器选择了 Intel 处理器。启动报错
问题原因:
电脑上没有安装Intel HAXM
解决方案:
找到Android sdk所在的目录。其下有extras\intel\Hardware_Accelerated_Execution_Manager
把该目录下的intelhaxm.exe安装一下


2.unable to write jarlist cache file F:\workspace\Android\appcompat_v7\bin\jarlist.cache
发生情景:
创建项目,最低兼容选择 2.2,最高选择 4.4
问题原因:
向下兼容
解决方案:
方法1:将最低兼容选择同级的,即也是选择 4.x 系列的即可
  [不推荐,因为 Android 应用都是要考虑向下兼容的]
方法2:E:\SL\appcompat_v7\res\values-v21\themes_base.xml:191: 
  说明,要求你的 sdk 为 android5.0 的 sdk,因此,需要把 Property 中 Android 的对应版本改成 5.0 才行
  即:将 project.properties 中 target 改为 android-21


3.Error retrieving parent for item: No resource found that matches the given name ‘android:Widget.Material.
   ActionButton‘.
  ......
发生情景:
创建项目,最低兼容选择 2.2,最高选择 4.4
问题原因:
向下兼容, 查看项目目录结构,发现 gen 目录下没有 R.java 文件
解决方案:
方法1:将最低兼容选择同级的,即也是选择 4.x 系列的即可
  [不推荐,因为 Android 应用都是要考虑向下兼容的]
方法2:E:\SL\appcompat_v7\res\values-v21\themes_base.xml:191: 
  说明,要求你的 sdk 为 android5.0 的 sdk,因此,需要把 Property 中 Android 的对应版本改成 5.0 才行
  即:将 project.properties 中 target 改为 android-21


4. This version of the rendering library is more recent than 
    your version of ADT plug-in. Please update ADT plug-in
发生情景:
eclipse 创建 android 项目时,预览 layout.xml 文件时提示: This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in,导致无法正常预览布局文件
问题原因:
编译的 SDK 版本为 4.4w,SDK版本过高,ADT版本过低
解决方案:
方法1:打开 layout 文件中的.xml文件,找到选择 android 版本按钮,改变 android 版本,我们改为4.4.2的版本。
方法2:打开 android 项目中的 project.properties,直接修改版本:target=android-19


5.  OpSQLite does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-
     library android.test.runner in its AndroidManifest.xml
发生情景:
运行 OpSOLite 的测试方法
问题原因:
未配置 Android 下的 junit 测试框架的配置信息
解决方案:
方法1:按照 junit 测试框架的配置,编辑 AndroidManifest.xml 文件--->此法不方便,要求记住如何配置
方法2:
1)右键---> Android Test Project---> 测试项目名称(随意写)---> next---> 选择要测试的项目---> finish
2)打开测试项目的 AndroidManifest.xml 文件和要测试的项目的 AndroidManifest.xml 文件,将前者中的
<instrumentation> 标签、<uses-library> 标签及其内容拷贝到后者中(按前者的样子粘贴即可)

版权声明:本文为博主原创文章,未经博主允许不得转载。

Android报错

标签:android   错误   

原文地址:http://blog.csdn.net/gulu_gulu_jp/article/details/46851539

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!