No module named 'com' when I used the monkeyrunner by python

73 Views Asked by At

I want to use the monkeyrunner by python, but it showed the error " No module named 'com' ".

 from com.android.monkeyrunner import MonkeyRunner,MonkeyDevice

Therefore, I searched lots of slovers to edit my monkeyrunner.bat, set the environment variable, but when I called the monkeyrunner on the command line, it still wrong.

Exception in thread "main" java.lang.NoClassDefFoundError: com/android/chimpchat/
    at com.android.monkeyrunner.MonkeyRunnerStarter.<init>(MonkeyRunnerStarter.java:60)
    at com.android.monkeyrunner.MonkeyRunnerStarter.main(MonkeyRunnerStarter.java:188)
Caused by: java.lang.ClassNotFoundException: com.android.chimpchat.ChimpChat
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:606)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:168)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 2 more

What's my problem?

My path

0

There are 0 best solutions below