SWT folder ‘..\framework\x86_64‘ does not exist. Please set ANDROID_SWT to point to the folder conta

Preface

It took me a few hours to report this error. To be honest, I found that many searches were changed to monkeyrunner.bat (most of the solutions are exactly the same, which is obvious). I tried it and it was useless. See It was inspired by the article of a big man.

Error report

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

Solution

By the method of Google and Baidu (Basically I read about 20 articles, maybe 19 articles are all this method, the words are all the same!). The following are the methods that I have tried and failed for me. Let me post it hahaha, in case it is useful to you!

set frameworkdir=lib 改为——> set frameworkdir=..\lib 

Insert picture description here

Dcom.android.monkeyrunner.bindir=..\framework -jar %jarpath% %* 
改为 ——> 
Dcom.android.monkeyrunner.bindir=..\..\platform-tools -jar %jarpath% %*

Insert picture description here
But it still didn’t solve my problem. After that, I tried randomly and reported another error like this

Error: Unable to access jarfile ..\framework\monkeyrunner-26.0.0-dev.jar

The picture
Insert picture description here
left me speechless , so I took advantage of my English to read this error: probably

The SWT folder "...\framework\x86\U 64" does not exist.
Please set ANDROID_SWT to point to the folder swt.jar containing the folder for your platform.

(Monkeyrunner.bat is in the bin directory) What I understand is that the framework does not exist in the upper level folder of my monkeyrunner, so I searched for x86 and monkeyrunner-26.0.0-dev and found it under the lib folder ( So I found the treasure), opened my x86 and found this swt.jar


So I searched on Google and borrowed the methods of other bloggers. I thought that there was no framework folder, so I built one myself and copied all the contents of the lib folder into the framework.

Insert picture description here
But when I run it again, it still
Insert picture description here
reports an error, stating that the system cannot find the specified file. Solution: Copy the adb.exe file under platform-tools to the framework folder just now.

Insert picture description here
When I ran it again, it still didn’t work, it was speechless.
I suddenly remembered that the monkeyrunner.bat in front of me was changed, which is the solution I searched out at the beginning, and then I changed it back, and it ran successfully after running it again!

Insert picture description here


Unfortunately, I got an error again. I was drunk. I took a close look at the code that popped up after the carriage return.

04:12:03 E/adb: adb server version (31) doesn't match this client (41); killing...
04:12:04 E/adb: could not read ok from ADB Server
04:12:04 E/adb: * failed to start daemon
04:12:04 E/adb: error: cannot connect to daemon
04:12:04 E/ddms: '..\framework\adb.exe start-server' failed -- run manually if necessary

Insert picture description here
Looking at these lines of code in detail, I guess I have two versions of adb (31 and 41)

I tried almost every possible code on a foreign website, but it still doesn't work. At this moment, I suddenly realized, how can I have two versions of adb? ? ? So I thought of my 360 mobile assistant, 360 mobile simulation demo, 360 and so on . For this, just ctrl+alt+delete, directly task manager, terminate the process, run it again, and the
Insert picture description here
programmer will change the bug. I should keep trying. I have a new experience in my diary yesterday: people who have done their best will not regret it (if they encounter a bug, they will change the bug, and the soldiers will block the water. If you encounter difficulties today, give up, you may meet again tomorrow. Should be facing it!)

https://blog.csdn.net/hanhanwanghaha Welcome to follow this super invincible cute duck.
You can leave a private message if you have any questions, you will reply when you see it!
Insert picture description here

If reproduced, please indicate the source

Guess you like

Origin blog.csdn.net/hanhanwanghaha/article/details/109813389