【问题标题】:Qpython uknown RPC errorQpython uknown RPC错误
【发布时间】:2016-02-24 16:15:33
【问题描述】:

我在 Android 上安装了 QPython 应用并执行了一个名为 helloworld.py 的脚本。它使用 androidhelper 的方法 ma​​ketoast 通过 Android api 显示消息。

我尝试在另一个文件上编写完全相同的脚本,但它给了我以下错误:

com.googlecode.android_scripting.rpc.RpcError: 未知的 RPC。

然后我尝试修改 helloworld.py,现在它给了我上述错误。

我在整个互联网上搜索了这个错误,但没有解决方案。

顺便说一句,我使用的是三星 Galaxy Tab 3 LITE T110N。

我已经尝试过使用 android 模块,但它不存在。 sl4a 也不存在。

我使用 python 2.7。

【问题讨论】:

    标签: android python python-2.7 qpython


    【解决方案1】:
    import androidhelper
    droid=androidhelper.Android()
    droid.makeToast("Hello, sl4a!")
    #not maketoast
    #it's makeToast!
    #read this:
    #http://www.mithril.com.au/android/doc/index.html
    #when you call sl4a,you have to tell sl4a what to do, if sl4a can't recognize it,
    #sl4a throws an Unknown RPC error
    #Thanks
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2014-01-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2019-10-24
      • 1970-01-01
      相关资源
      最近更新 更多