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)

  • 相关阅读:
    vue初级 总结
    defineProperty和defineProperties介绍
    vue的生命周期
    将组件拼装使用
    Android和Html的简单交互
    Android接口回调的理解
    Android设计模式—— 观察者模式(以及EventBus的简单使用)
    Android Span的简单使用
    Android7.0打开sdacrd图片问题
    打开图片无缩略图错误
  • 原文地址:https://www.cnblogs.com/zhitang2009/p/3418314.html
Copyright © 2011-2022 走看看