Giter VIP home page Giter VIP logo

Comments (9)

xiaocong avatar xiaocong commented on August 20, 2024

Please try below commands after you meet the issue:

ls -l /tmp/libs
adb logcat -d

And then log the output in the issue. Many thanks.

from uiautomator.

ZhouLihua avatar ZhouLihua commented on August 20, 2024

Hi xiaocong:
I've solved the problem by upgrade the uiautomator to version 0.1.18. And I'v made some tests.
It is really easy and convenience to use.
And I have a suggestion.
You may compact a few commands into a package insead of each command s rpc call.
And your application could not run on Android(4.1, 4.2). Because each version of android has its own uiautomator.jar

In  README.md: from uiautomator import Device will raise en error. Device is missing.
 dir(uiautomator)

['JsonRPCClient', 'Selector', '_Adb', '_AutomatorDevice', '_AutomatorDeviceObject', '_AutomatorServer', '_JsonRPCClient', '_Selector', 'all', 'author', 'builtins', 'doc', 'file', 'name', 'package', 'version', 'adb', 'device', 'hashlib', 'itertools', 'json', 'os', 'param_to_property', 'point', 'rect', 'server_port', 'subprocess', 'tempfile', 'time', 'urllib2']

In total, thanks your idea and your sharing.

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

Thanks a lot.

For your first suggestion, can I know the exact usage scenario for compacting a few commands? It's very important for me to understand for what exact reason the requirements are raised.

You mentioned something wrong on Android 4.1/4.2, could you please give me some clues for it? I could not reproduce it on my Android4.1/4.2 devices. I really appreciate if you can put some logs on the issue.

And for the last issue, likely you import a wrong uiautomator package, please check all files in the directory you run the script.

from uiautomator.

joooohnli avatar joooohnli commented on August 20, 2024

D/AndroidRuntime( 1133): Calling main entry com.android.commands.uiautomator.Launcher
E/dalvikvm( 1133): Could not find class 'com.googlecode.jsonrpc4j.JsonRpcServer', referenced from method com.github.uiautomatorstub.Stub.setUp
W/dalvikvm( 1133): VFY: unable to resolve new-instance 40 (Lcom/googlecode/jsonrpc4j/JsonRpcServer;) in Lcom/github/uiautomatorstub/Stub;
D/dalvikvm( 1133): VFY: replacing opcode 0x22 at 0x0010
D/dalvikvm( 1133): DexOpt: unable to opt direct call 0x0093 at 0x14 in Lcom/github/uiautomatorstub/Stub;.setUp
D/dalvikvm( 1133): DexOpt: unable to opt direct call 0x01f9 at 0x1e in Lcom/github/uiautomatorstub/Stub;.setUp
D/AndroidRuntime( 1133): Shutting down VM
W/dalvikvm( 1133): threadid=1: thread exiting with uncaught exception (group=0xb3a84ba8)
E/UiAutomatorTestRunner( 1133): uncaught exception
E/UiAutomatorTestRunner( 1133): java.lang.IllegalStateException: UiAutomationService android.accessibilityservice.IAccessibilityServiceClient$Stub$Proxy@b3f37088already registered!
E/UiAutomatorTestRunner( 1133): at android.os.Parcel.readException(Parcel.java:1473)
E/UiAutomatorTestRunner( 1133): at android.os.Parcel.readException(Parcel.java:1419)
E/UiAutomatorTestRunner( 1133): at android.view.accessibility.IAccessibilityManager$Stub$Proxy.registerUiTestAutomationService(IAccessibilityManager.java:342)
E/UiAutomatorTestRunner( 1133): at android.app.UiAutomationConnection.registerUiTestAutomationServiceLocked(UiAutomationConnection.java:175)
E/UiAutomatorTestRunner( 1133): at android.app.UiAutomationConnection.connect(UiAutomationConnection.java:72)
E/UiAutomatorTestRunner( 1133): at android.app.UiAutomation.connect(UiAutomation.java:188)
E/UiAutomatorTestRunner( 1133): at com.android.uiautomator.core.UiAutomationShellWrapper.connect(UiAutomationShellWrapper.java:32)
E/UiAutomatorTestRunner( 1133): at com.android.uiautomator.testrunner.UiAutomatorTestRunner.start(UiAutomatorTestRunner.java:118)
E/UiAutomatorTestRunner( 1133): at com.android.uiautomator.testrunner.UiAutomatorTestRunner.run(UiAutomatorTestRunner.java:96)
E/UiAutomatorTestRunner( 1133): at com.android.commands.uiautomator.RunTestCommand.run(RunTestCommand.java:91)
E/UiAutomatorTestRunner( 1133): at com.android.commands.uiautomator.Launcher.main(Launcher.java:83)
E/UiAutomatorTestRunner( 1133): at com.android.internal.os.RuntimeInit.nativeFinishInit(Native Method)
E/UiAutomatorTestRunner( 1133): at com.android.internal.os.RuntimeInit.main(RuntimeInit.java:243)
E/UiAutomatorTestRunner( 1133): at dalvik.system.NativeStart.main(Native Method)
I/AndroidRuntime( 1133): VM exiting with result code -1.

do you know why this happened? thanks.

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

Likely bundle.jar file missed. Please help check if there is the file under /data/local/tmp. Thanks.

from uiautomator.

joooohnli avatar joooohnli commented on August 20, 2024

hi @xiaocong
Recently, I'm trying to use your wrapper on android L, but some problems occur, would you please tell me the version number of nanohttpd release that you've packaged into your bundle.jar? thanks!

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

Thank you. I just add a fix for the issue. Please help check whether the fix works.

from uiautomator.

joooohnli avatar joooohnli commented on August 20, 2024

it works fine, thanks you.

from uiautomator.

cnrting avatar cnrting commented on August 20, 2024

it seems like it's the storage problem which cause this.

from uiautomator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.