安装APK的错误码,定义在android源码中的这个文件中:
frameworks\base\core\java\android\content\pm\PackageManager.java
/**
* if the package is already installed.
* 程序已经存在
*/
public static final int INSTALL_FAILED_ALREADY_EXISTS = -1;
/**
* if the package archive file is invalid.
* 无效的APK
*/
public static final int INSTALL_FAILED_INVALID_APK = -2;
/**
* if the URI passed in is invalid.
* 无效的链接
*/
public static final int INSTALL_FAILED_INVALID_URI = -3;
/**
* if the package manager service found that the device
* didn't have enough storage space to install the app.
* 没有足够的存储空间
*/
public static final int INSTALL_FAILED_INSUFFICIENT_STORAGE = -4;
/**
* if a package is already installed with the same name.
* 已存在同名程序
*/
public static final int INSTALL_FAILED_DUPLICATE_PACKAGE = -5;
/**
* if the requested shared user does not exist.
* 共享用户不存在
*/
pu