开发者

How can I uninstall a package using Monkeyrunner?

开发者 https://www.devze.com 2023-02-10 02:21 出处:网络
What is wrong with this scri开发者_JS百科pt? # Imports the monkeyrunner modules used by this program

What is wrong with this scri开发者_JS百科pt?

 # Imports the monkeyrunner modules used by this program 
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice 
# Connects to the current device, returning a MonkeyDevice object 
device = MonkeyRunner.waitForConnection() 
 #Uninstall package 
 device.removePackage ('MyApp.apk')

I also tried using the path of the application and didn't work.


try this:

device.removePackage 'com.mypackage.myapp'
0

精彩评论

暂无评论...
验证码 换一张
取 消