Android上的keystore类型更改为BKS-V1,避免签名失败的问题
This commit is contained in:
parent
d4c62aff2b
commit
c558a112d7
Binary file not shown.
|
|
@ -38,7 +38,16 @@ public class BuildAndSignApkTask implements Runnable {
|
||||||
|
|
||||||
File keyStoreFile = new File(keyStoreFilePath);
|
File keyStoreFile = new File(keyStoreFilePath);
|
||||||
// assets/keystore分隔符不能使用File.separator,否则在windows上抛出IOException !!!
|
// assets/keystore分隔符不能使用File.separator,否则在windows上抛出IOException !!!
|
||||||
FileUtils.copyFileFromJar("assets/keystore", keyStoreFilePath);
|
String keyStoreAssetPath;
|
||||||
|
if (isAndroid()) {
|
||||||
|
// BKS-V1 类型
|
||||||
|
keyStoreAssetPath = "assets/android.keystore";
|
||||||
|
} else {
|
||||||
|
// BKS 类型
|
||||||
|
keyStoreAssetPath = "assets/keystore";
|
||||||
|
}
|
||||||
|
|
||||||
|
FileUtils.copyFileFromJar(keyStoreAssetPath, keyStoreFilePath);
|
||||||
|
|
||||||
boolean signResult = signApk(unsignedApkPath, keyStoreFilePath, signedApkPath);
|
boolean signResult = signApk(unsignedApkPath, keyStoreFilePath, signedApkPath);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue