仪表APK在云猴中失败

时间:2014-04-11 04:26:20

标签: android testing mobile automation

当尝试仪器APK时,它显示仪器APK不成功。错误检测APK。当在控制台中进行仪器化之前打开仿真器时,它显示“无法使用软件渲染器初始化OpenglES仿真。” 在检测之后它显示错误消息 Error message shown

这是控制台

中显示的消息
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)

1 个答案:

答案 0 :(得分:0)

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

在云猴的论坛上,你会看到这两个主题:

Error instrumenting apk Instrumentation failed

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

项目成员#1 connor.tumbleson 这将是防止坏PNG的特征预防。这不是一个错误。 状态:无效

所以基本上你似乎有无效的9-Path图像,请你尝试使用其他9-Patch图像(仅用于测试目的)并证实这一点?