Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Uiautomatorviewer is giving error "SWT folder '..\lib\location of your Java installation.' does not exist"

I have installed Android studio V 3.1.1

i am trying to launch UIautoamtorviewer.bat file from

C:\Users\panmishr\AppData\Local\Android\Sdk\tools\bin 

however it always gives me error

SWT folder '..\framework\location of your Java installation.' does not exist.Please set ANDROID_SWT to point to the folder containing swt.jar for your platform.

below are list of env variables , which i have set

ANDROID_HOME: C:\Users\panmishr\AppData\Local\Android\Sdk
ANDROID_SWT:C:\Users\panmishr\AppData\Local\Android\Sdk\tools\lib\x86_64
JAVA_HOME :C:\Program Files\Java\jdk1.8.0_171

in Path Variable , i have included

C:\Users\panmishr\App;C:\Users\panmishr\AppData\Local\Android\Sdk\tools
C:\Users\panmishr\AppData\Local\Android\Sdk\platform-tools

My machine is 64 bit windows 7 .

Let me know, what i have missed.

like image 528
pankaj mishra Avatar asked Apr 25 '18 06:04

pankaj mishra


1 Answers

I was able to resolve this with the help of sdkmanager.bat

Go to bin folder

    C:\Users\panmishr\AppData\Local\Android\Sdk\tools\bin

    run 

    `**sdkmanager.bat**`

it will give the correct error, like in my case JAVA_HOME path was Set to old path in registry.

Run regedit

Search JAVA_HOME

Delete the old JAVA_HOME key and value.

log off the machine

run uiautomatorviewer.bat

This time it worked!!

like image 149
pankaj mishra Avatar answered Nov 04 '22 20:11

pankaj mishra