Android向けに開発を始めたばかりで、Google Play開発者のライセンスはありません。私のアプリケーションでは、APK拡張ファイルを使用する必要があります。パブリッシャーアカウントなしで拡張ファイルを使用するアプリケーションを作成する
また私ができる私は本当の出版社なしで自分のアプリケーションをテストする方法
public class SampleDownloaderService extends DownloaderService {
// You must use the public key belonging to your publisher account
public static final String BASE64_PUBLIC_KEY = "MyLVLKey";
// You should also modify this salt
public static final byte[] SALT = new byte[] { 1, 42, -12, -1, 54, 98,
-100, -12, 43, 2, -8, -4, 9, 5, -106, -107, -33, 45, -1, 84
};
を持って、私はplay_apk_expansionに含まれるdownloader_sampleのコードを適用しようとしましたが、InvalidKeySpecException指定は、このメソッド
private static PublicKey generatePublicKey(String encodedPublicKey) {
try {
byte[] decodedKey = Base64.decode(encodedPublicKey);
KeyFactory keyFactory = KeyFactory.getInstance(KEY_FACTORY_ALGORITHM);
return keyFactory.generatePublic(new X509EncodedKeySpec(decodedKey));
} catch (NoSuchAlgorithmException e) {
// This won't happen in an Android-compatible environment.
throw new RuntimeException(e);
} catch (Base64DecoderException e) {
Log.e(TAG, "Could not decode from Base64.");
throw new IllegalArgumentException(e);
} catch (InvalidKeySpecException e) {
Log.e(TAG, "Invalid key specification.");
throw new IllegalArgumentException(e);
}
}
によってスローされますアカウント?
ありがとうございます。あなたは最も役に立つと助けてくれました – Huichos
http://stackoverflow.com/questions/11933508/problems-testing-apk-expansion-library/12577825#12577825。私の答えをよく理解するために –