在Android进行Junit单元测试的时候报以下错误:

[2015-04-06 20:26:21 - adtest] adtest does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-library android.test.runner in its AndroidManifest.xml

是权限配置问题,需要在AndroidManifest.xml 加上2条配置信息:

<code class="hljs xml has-numbering" style="display: block; padding: 0px; color: inherit; box-sizing: border-box; font-family: 'Source Code Pro', monospace;font-size:undefined; white-space: pre; border-radius: 0px; word-wrap: normal; background: transparent;"><span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">application</span>></span><span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">uses-library</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">android:name</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"android.test.runner"</span> /></span>
<span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">application</span>></span><span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"><<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">instrumentation</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">android:name</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"android.test.InstrumentationTestRunner"</span> <span class="hljs-attribute" style="box-sizing: border-box; color: rgb(102, 0, 102);">android:targetPackage</span>=<span class="hljs-value" style="box-sizing: border-box; color: rgb(0, 136, 0);">"com.example.adtest"</span>></span><span class="hljs-tag" style="color: rgb(0, 102, 102); box-sizing: border-box;"></<span class="hljs-title" style="box-sizing: border-box; color: rgb(0, 0, 136);">instrumentation</span>></span></code>
转载:http://blog.csdn.net/ldl22847/article/details/44905535

does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare相关推荐

  1. does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-l

    Android junit单元测试 错误原信息: junittest does not specify a android.test.InstrumentationTestRunner instrum ...

  2. does not specify a android.test.InstrumentationTestRunner instrumentation or does not declare uses-

  3. MyContentProvider does not specify a android.test.InstrumentationTestRunner instrumentation or does

    原因:主要是你采用了第一种的android的测试方法担忧没有在AndroidManifest.xml中进行相应的配置. 解决办法:在AndroidManifest.xml中的相应位置加上以下代码即可: ...

  4. Android:单元测试InstrumentationTestRunner

    报错:[2018-11-25 13:41:08 - Day03_单元测试] Day03_单元测试 does not specify a android.test.InstrumentationTest ...

  5. does not declare uses-library android.test.runner

    在平时Android开发时突然执行程序,出现了 Application does not specify a android.test.InstrumentationTestRunner instru ...

  6. android下测试方法及junit单元测试框架配置方法

     1.测试方法: 根据测试是否知道源代码分为: 1.  黑盒测试:只关心程序执行的过程 和 结果 2.  白盒测试:根据源代码写测试方法 或者 测试用例 根据测试粒度: 1.方法测试:function ...

  7. android入门基础笔记,Sqlite数据库下载

    * 移动通讯技术的发展: 第一代通讯技术:模拟信号 工作频段   缺点:保密性差 第二代通讯技术: 体积越来越小  数字信号(加密)   短信  彩信 第三代通讯技术: 数字信号   可处理图像.音乐 ...

  8. Android解析XML三种方式(PULL、SAX、DOM)

    本篇博客重点介绍Android中三种解析XML的方式,包括PULL.SAX.DOM,当然不止这些,还可以用第三方的jar包提供的解析,只是这三种在Android中比较常用吧.再顺便介绍一下Androi ...

  9. xml的三种解析方式

    本篇博客重点介绍Android中三种解析XML的方式,包括PULL.SAX.DOM,当然不止这些,还可以用第三方的jar包提供的解析,只是这三种在Android中比较常用吧.再顺便介绍一下Androi ...

最新文章

  1. 在CentOS 6.9 x86_64的nginx 1.12.2上开启标准模块ngx_http_map_module实录
  2. GNN笔记:傅里叶变换
  3. Effective Java读书笔记六:方法
  4. GraphPad Prism多数据处理实用技巧
  5. list中抽出某一个字段的值_使用LINQ获取List列表中的某个字段值
  6. c vs java_c++ vs java---之一
  7. 进程、线程和协程的理解
  8. 杂记-字符串的字节长度
  9. 如果访问设备屏幕宽度小于1024,跳转到移动端
  10. 数据安全治理面临哪些挑战
  11. 红外遥控器的驱动函数
  12. 数据结构-BF算法和KMP算法
  13. 导数公式、导数运算法则、复合函数求导、幂指函数求导
  14. 高德poi类别23个大类 261个中类 4705个小类
  15. java 通配符 删除文件_jQuery removeClass通配符
  16. linux垃圾文件清理,请问 如何linux 垃圾文件清理、
  17. DNS图解(秒懂 + 史上最全)
  18. 【XBOX360】Xbox360 RGH3.0 刷机教程
  19. 维修服务器bga是什么,BGA芯片元器件坏了怎么拆除焊死的BGA?
  20. C++11之emplace_back

热门文章

  1. 如何免费将pdf转word?看完这篇你就会了
  2. AI考生迎战高考语文作文 - 新课标I卷 故事的力量
  3. NLP考题:为什么中文分词比英文分词更难?有哪些常用算法?(附代码)
  4. vb教材笔记_金文老师vb教程笔记(完整版).doc
  5. RAC中ASM磁盘组管理
  6. 基于Java毕业设计学生选课系统源码+系统+mysql+lw文档+部署软件
  7. 日历日期根据后台数据带背景的插件 Zabuto Calendar 使用
  8. 全国DAMA-CDGA/CDGP数据治理认证怎么样?
  9. 微分方程对计算机专业用处,工科类,大学要学哪些数学课程?
  10. web前端 品优购首页+源代码(2)