System failed to instrument application. Invalid resource directory.

Mobile Testing, Android App Testing.
craigwp
Posts: 3
Joined: Wed Nov 07, 2018 3:15 pm

System failed to instrument application. Invalid resource directory.

Post by craigwp » Wed Nov 07, 2018 3:21 pm

Hi Everyone,

Got some trouble when instrumenting an application through the wizard.

Currently on Ranorex version 9.8.0+git.994387e4.

The error log is attached as a file. Hoping someone has had a similar issue and has a solution.

On the other hand, is there a way to instrument an application from code in say androidSDK ?
You do not have the required permissions to view the files attached to this post.

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

Re: System failed to instrument application. Invalid resource directory.

Post by odklizec » Fri Nov 09, 2018 9:59 am

Hi

At first, are try to delete (manually) entire framework dir, located here:
C:\Users\craigwp\AppData\Local\apktool\framework
If you are not able to delete this dir, restart PC and try it again. BTW, do you have admin privileges on that PC?
What OS are you using?
Try to start the Ranorex instrumentation wizard as administrator.

If nothing from the above helps, then there is most probably something wrong with your PC? Maybe you don't have enough privileges or there is a group policy/antivirus settings, preventing you (instrumentation wizard) from modifying the framework directory? Could you please try it on another PC/virtual machine?
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

User avatar
qwertzu
Posts: 284
Joined: Wed Jan 25, 2017 11:08 am

Re: System failed to instrument application. Invalid resource directory.

Post by qwertzu » Fri Nov 09, 2018 12:39 pm

hey craigwp,

I've seen this instrumentation error before.
This seems to be a bug in the apk tool itself and therefore is not related to Ranorex. I had the same issue and tried to instrument the app via apktool without using Ranorex. The same error appeared.

So, I downgraded the apktool and afterwards, I was able to instrument the app.
I'm now using apktool version 2.3.2.
So please download this version here: https://connortumbleson.com/2018/04/07/ ... -released/

In order to make sure Ranorex uses this apktool version, you need to unpack the *.jar file, rename the file to "apktool.jar" and replace it with the existing one in this directory on your machine: C:\Program Files (x86)\Ranorex 8.3\Bin\RxEnv\Android\tools\apkTool

Afterwards, please delete the temporary files as Pavel already suggested, just to make sure that all old files get renewed.

Hope, this helps.
regards, qwertzu