Unable to install Apk pak

Mobile Testing, Android App Testing.
anu321
Posts: 4
Joined: Sat Mar 28, 2015 2:30 am

Unable to install Apk pak

Post by anu321 » Mon Mar 30, 2015 5:35 pm

Hi, I am seeing following error when I am trying to APK (App under test)

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: 66694
at org.jf.dexlib2.writer.DexDataWriter.writeUshort(DexDataWriter.java:116)
at org.jf.dexlib2.writer.InstructionWriter.write(InstructionWriter.java:312)
at org.jf.dexlib2.writer.DexWriter.writeCodeItem(DexWriter.java:980)
at org.jf.dexlib2.writer.DexWriter.writeDebugAndCodeItems(DexWriter.java:759)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:214)
at org.jf.dexlib2.writer.DexWriter.writeTo(DexWriter.java:192)
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:349)
at brut.androlib.Androlib.buildSources(Androlib.java:289)
at brut.androlib.Androlib.build(Androlib.java:275)
at brut.androlib.Androlib.build(Androlib.java:250)
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)

anu321
Posts: 4
Joined: Sat Mar 28, 2015 2:30 am

Re: Unable to install Apk pak

Post by anu321 » Mon Mar 30, 2015 8:10 pm

Please help on above issue.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7469
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Unable to install Apk pak

Post by odklizec » Mon Mar 30, 2015 9:21 pm

Hi,

If you are sure you followed the instructions correctly and it still does not work, then the best you can do is to send your apk to Ranorex support (at [email protected]) so they can analyze it. There is not much they can do without the apk and more details about your system, application under test (what Android version, are you using pure Android or with some 3rd party libs or frameworks, etc), Ranorex version (have you tried latest 5.3.1?), etc...

BTW, similar (if not the same) error has been reported here...
http://www.ranorex.com/forum/deployment ... tml#p29497
There is no solution mentioned, but Ranorex guys may already have one? ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration