【问题标题】:Instrumenting APK unsuccessfull in Cloud monkey在 Cloud Monkey 中检测 APK 失败
【发布时间】:2014-05-25 01:45:34
【问题描述】:

当尝试检测 APK 时,它显示检测 APK 失败。检测 APK 时出错。在控制台中检测之前打开模拟器时,它显示“无法使用软件渲染器初始化 OpenglES 模拟”。 检测后显示错误消息

这是控制台中显示的消息

System.getProperty("java.home") = C:\Program Files (x86)\Java\jdk1.7.0_51\jre
Instrumenting C:\Users\dinu\Desktop\EventManagement\CellStash.apk using C:\Users\dinu\AppData\Local\Temp\tools_AndroidInstrumentor1397189107139\tools\mtagent\monkeytalk-agent.jar

Unpacking tools into C:\Users\dinu\AppData\Local\Temp\tools_AndroidInstrumentor1397189107139\tools

Analyzing package Step 1 of 2

Unbundle started in C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1

Unbundle completed with exit code 0

Unbundle output:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\dinu\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
S: Could not decode file, replacing by FALSE value: drawable/popup.9.png
S: Could not decode file, replacing by FALSE value: drawable-mdpi/popup_bg.9.png
S: Could not decode file, replacing by FALSE value: drawable/action_item_selected.9.png
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...


Generated project directory: CellStash

AndroidTarget was no defined, obtaining last android target installed

androidTarget= android-19

Analyzing package Step 2 of 2

Dex started: C:\Users\dinu\Desktop\EventManagement\CellStash.apk

Dex completed with exit code 0

Dex output: dex2jar C:\Users\dinu\Desktop\EventManagement\CellStash.apk -> CellStash-dex2jar.jar

Updating package Step 1 of 2

android update project begins: [C:\Users\dinu\AppData\Local\Android\android-sdk\tools\android.bat, update, project, --target, android-19, --path, .]

android update project completed with exit code 0

android update project output:
'xcopy' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
The system cannot find the path specified.
Updated and renamed default.properties to project.properties
Updated local.properties
No project name specified, using Activity name 'MainActivity'.
If you wish to change it, edit the first line of build.xml.
Added file C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\build.xml
Added file C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\proguard-project.txt

Analyzing package Step 2 of 2

build of instrumented project begins...

Using android target= android-19

Building with command line: [C:\Users\dinu\AppData\Local\Temp\tools_AndroidInstrumentor1397189107139\tools\ant\bin\ant.bat, -DAPKJAR_DEX=C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\CellStash-dex2jar.jar, -DMTAGENT=C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\libs\monkeytalk-agent.jar, -DERROR_LEVEL=ignore, -DASPECTJ_HOME=C:\Users\dinu\AppData\Local\Temp\tools_AndroidInstrumentor1397189107139\tools\AspectJ, -DANDROID_HOME=C:\Users\dinu\AppData\Local\Android\android-sdk, -DPROJECT_NAME=CellStash, instrument_apk]

Build completed with exit code -1

Build output:
Buildfile: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\build.xml

weave_aspects:
     [move] Moving 1 file to C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\libs

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 22.6.2
 [checkenv] Installed at C:\Users\dinu\AppData\Local\Android\android-sdk

-setup:
     [echo] Project Name: CellStash
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 19.0.3
     [echo] Resolving Build Target for CellStash...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
[gettarget] WARNING: No minSdkVersion value set. Application will install on all Android versions.
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin
    [mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\res
    [mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\rsObj
    [mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\rsLibs
    [mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\gen
    [mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\classes
    [mkdir] Created dir: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\dexedLibs
     [echo] ----------
     [echo] Resolving Dependencies for CellStash...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency] 
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
   [subant] No sub-builds to iterate on

-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Generating resource IDs...
     [aapt] C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\res\values\drawables.xml:3: error: Resource entry action_item_selected is already defined.
     [aapt] res\drawable\action_item_selected.9.png:0: Originally defined here.
     [aapt] C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\res\values\drawables.xml:4: error: Resource entry popup is already defined.
     [aapt] res\drawable\popup.9.png:0: Originally defined here.
     [aapt] C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\res\values-mdpi\drawables.xml:3: error: Resource entry popup_bg is already defined.
     [aapt] res\drawable-mdpi\popup_bg.9.png:0: Originally defined here.

BUILD FAILED
C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\build_master.xml:653: The following error occurred while executing this line:
C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\build_master.xml:698: null returned: 1

Total time: 8 seconds
 : ERROR: Process exited with an error: 1 (Exit value: 1)

instrumented APK file was not created at: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\CellStash-debug.apk

Error instrumenting apk 'C:\Users\dinu\Desktop\EventManagement\CellStash.apk': instrumented APK file was not created at: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\CellStash-debug.apk

com.gorillalogic.monkeytalk.instrumentor.android.AndroidInstrumentor$InstrumentationException: instrumented APK file was not created at: C:\Users\dinu\AppData\Local\Temp\tmp_AndroidInstrumentor1397189107138_1\CellStash\bin\CellStash-debug.apk
    at com.gorillalogic.monkeytalk.instrumentor.android.AndroidInstrumentor.copyInstrumentedApk(AndroidInstrumentor.java:235)
    at com.gorillalogic.monkeytalk.instrumentor.android.AndroidInstrumentor.beginInstrumentation(AndroidInstrumentor.java:199)
    at com.gorillalogic.monkeytalk.instrumentor.android.AndroidInstrumentor.instrumentApk(AndroidInstrumentor.java:130)
    at com.gorillalogic.monkeytalk.ide.instrumentor.InstrumentApkAction$InstrumentApkJob.run(InstrumentApkAction.java:137)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

【问题讨论】:

    标签: android testing mobile automation


    【解决方案1】:

    您好,看来您不是唯一遇到此问题的人,它与 Android's pkg-tool 以及它如何使用解码功能(双重检查 png 原始数据)有关

    在云猴的论坛你会看到这两个帖子:

    Error instrumenting apk Instrumentation failed

    我进入android-apktool's forum,基本上找到了这个

    项目成员 #1 connor.tumbleson 这将是针对坏 PNG 的功能预防。这不是错误。 状态:无效

    所以基本上看来您的 9-Path 图像无效,您能否尝试使用其他 9-Patch 图像代替(仅用于测试目的)并证实这一点?

    【讨论】:

      猜你喜欢
      • 2011-01-20
      • 2019-06-17
      • 2011-07-25
      • 1970-01-01
      • 1970-01-01
      • 2018-01-29
      • 2022-10-23
      • 2013-04-17
      • 2016-06-13
      相关资源
      最近更新 更多