Android - Download App

匿名 (未验证) 提交于 2019-12-03 02:29:01

问题:

I'm attempting to create an unsigned internal test build of an application I'm writing, and I'm getting some strange errors.

I'm using Eclipse's Android Tools to generate an Unsigned APK, then attach it to our group wiki, at which point a user can click to download it, and attempt to install it, but it keeps erroring with:

Application not installed

LogCat reveals:

06-06 11:11:25.532: W/ActivityManager(1401): No content provider found for permission revoke: file:///mnt/sdcard/Download/2012-06-06-02-App-Name.apk 06-06 11:11:25.652: W/ActivityManager(1401): No content provider found for permission revoke: file:///mnt/sdcard/Download/2012-06-06-02-App-Name.apk 06-06 11:11:25.712: E/PackageParser(1401): Package com.site.appname has no certificates at entry res/anim/slide_in_1.xml; ignoring!

I attempted deleting and recreating that XML file, but to no avail.

EDIT: Also, I have tried this on 3 different development devices, from Android 2.1 to 4.0, one with a custom ROM, all of which had previous builds, but I force stop / clear data / uninstalled them. Additionally I just created a new emulator, based on 4.0, x86, and it does the same thing.

EDIT 2: Signing it with a new key made it work, but I'd still like to know why it will not work unsigned.

回答1:

It's simply a security feature built into the OS. Unless you are running a userdebug or eng build of Android, all APKs must be signed with something (even if it is your debug key) in order to install them on a device.

The emulator, by default, is running a userdebug build, which is why you can install unsigned APKs there if you had previously tried that.



转载请标明出处:Android - Download App
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!