简体   繁体   English

在CentOS中使用ADB在模拟器中安装APK

[英]Install APK in the Emulator using ADB in CentOS

I am new to CentOS and I want to install an APK in the emulator using ADB. 我是CentOS的新手,我想使用ADB在模拟器中安装APK。 Using terminal, I used this syntax: 使用终端,我使用以下语法:

adb install <nameofapk>.apk

That command gave me this error : 该命令给了我这个错误:

Whoops: didn't find expected signature
read_central_directory_entry failed
file '<nameofapk.>.apk' is not a valid zip file
rm failed for /data/local/tmp/<nameofapk>.apk, No such file or directory

What do i need to do to get rid of that error message and be able to successfully install the APK? 我需要怎么做才能摆脱该错误消息并能够成功安装APK?

Probably your APK file is invalid or corrupted, that's why it can't be installed. 您的APK文件可能无效或已损坏,因此无法安装。 Try 尝试

unzip -t <nameofapk>.apk

to see if there's something wrong with your file. 查看文件是否有问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM