instrumention failed

Mobile Testing, Android App Testing.
karthik
Posts: 1
Joined: Tue Feb 02, 2016 10:01 am

instrumention failed

Post by karthik » Tue Feb 02, 2016 10:12 am

Hi,

I was new user of ranorex and I was not able to deploy my APK to my android. I'm following the android user guide. I am using latest Ranorex and gets following error gets displayed


Instrumentation failed...

Please make sure that
- The API is not obfuscated.
- You are using API level 8 or above.
- No uninstrumented APK version is installed on the device.

And the error details are:

System.Exception: Failed to recompile the instrumented code. See details for more information: Exception in thread "main" org.jf.util.ExceptionWithContext: Unsigned short value out of range: 66746
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:329)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:1027)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:803)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:252)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:230)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:57)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:41)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:385)
at brut.androlib.Androlib.buildSources(Androlib.java:312)
at brut.androlib.Androlib.build(Androlib.java:295)
at brut.androlib.Androlib.build(Androlib.java:268)
at brut.apktool.Main.cmdBuild(Main.java:225)
at brut.apktool.Main.main(Main.java:84)


at Ranorex.Plugin.Mobile.Tools.Android.Instrumentation.ApkFileInstrumenter.CompileApkFile(String sourceApkFilePath, IPathService pathService)
at Ranorex.Plugin.Mobile.Utils.BackgroundWorkerSupported.ExecuteBgwCode[TArg0,TArg1](BgwDelegate`2 methodDelegate, Int32 doneProgress, String progressText, TArg0 arg0, TArg1 arg1, BackgroundWorker bgw)
at Ranorex.Plugin.Mobile.Tools.Android.Instrumentation.ApkFileInstrumenter.Instrument(String apkFilePath, Int32 port, InstrumentApkOptions deployOptions, BackgroundWorker bgw)
at Ranorex.Controls.Instrumentation.Workers.AndroidWorker.Run()
at Ranorex.Controls.AndroidInstrumentProgressPage.bgw_DoWork(Object sender, DoWorkEventArgs e)

Kindly help me from this issue


thanks and regards
karthikeyan s

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: instrumention failed

Post by Support Team » Wed Feb 03, 2016 2:08 pm

Hi Karthikeyan,

May I ask you to use the instrumentation flags as described in this posting?

Please do let me know if this solves the problem.
Thanks & Regards,
Markus (S)
.
Image