zoukankan      html  css  js  c++  java
  • 问题解决:INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for

    只有apk包,创建空android test project时,如果src节点下的文件要和 gen文件下一致,否则运行adb shell命令时,会报错。

    因为我们创建junit test case 时,习惯上会保持和被测试app一致如:cn.mama.activity.test。但自动生成的目录却不是这个

    把测试项目打包后,用aapt.exe工具查看,会发现包名是gen的子目录一致,而不是src下的子目录:

    血的教训

    D:adt-bundle-windows-x86_64-20131030others esignedAPK>adb shell am instrument
     -w -e class cn.mama.activity.test.TestMMQ cn.mama.activity.test/android.test.In
    strumentationTestRunner
    INSTRUMENTATION_STATUS: id=ActivityManagerService
    INSTRUMENTATION_STATUS: Error=Unable to find instrumentation info for: Component
    Info{cn.mama.activity.test/android.test.InstrumentationTestRunner}
    INSTRUMENTATION_STATUS_CODE: -1
    android.util.AndroidException: INSTRUMENTATION_FAILED: cn.mama.activity.test/and
    roid.test.InstrumentationTestRunner
            at com.android.commands.am.Am.runInstrument(Am.java:593)
            at com.android.commands.am.Am.run(Am.java:118)
            at com.android.commands.am.Am.main(Am.java:81)
            at com.android.internal.os.RuntimeInit.finishInit(Native Method)
            at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:238)
            at dalvik.system.NativeStart.main(Native Method)

  • 相关阅读:
    Java Swing打猎射击游戏源码
    php实现在线下载程序安装包功能
    WP
    双人对战的球类游戏IOS源码
    非常不错的新闻客户端应用安卓源码
    创业建议:如何写挖人邮件
    wp8路线跟踪应用源码详细说明
    wp版笔记本应用源码
    旅游风景展示应用源码iPad版
    bitset优化背包
  • 原文地址:https://www.cnblogs.com/zhitang2009/p/3418314.html
Copyright © 2011-2022 走看看