我正在处理 APK 扩展文件,我查看了这些链接:
2) http://ankitthakkar90.blogspot.in/2013/01/apk-expansion-files-in-android-with.html
我已经从路径 sdk-path/extras/google 导入了 market_licensing、play_apk_expansion
play_apk_expansion 包含三个项目 downloader_library、zip_file、downloader_sample。
现在我有 SampleDownloaderActivity 我面临的问题:
我还没有在控制台中上传apk文件,我正在尝试测试SampleDownloaderActivity proj,但我收到了这个错误:
02-21 12:54:13.150: E/AndroidRuntime(544): FATAL EXCEPTION: main
02-21 12:54:13.150: E/AndroidRuntime(544): java.lang.IllegalArgumentException: java.security.spec.InvalidKeySpecException: java.io.EOFException: DEF length 67 object truncated by 48
02-21 12:54:13.150: E/AndroidRuntime(544): at com.google.android.vending.licensing.LicenseChecker.generatePublicKey(LicenseChecker.java:121)
02-21 12:54:13.150: E/AndroidRuntime(544): at com.google.android.vending.licensing.LicenseChecker.<init>(LicenseChecker.java:92)
02-21 12:54:13.150: E/AndroidRuntime(544): at com.google.android.vending.expansion.downloader.impl.DownloaderService$LVLRunnable.run(DownloaderService.java:765)
02-21 12:54:13.150: E/AndroidRuntime(544): at android.os.Handler.handleCallback(Handler.java:587)
02-21 12:54:13.150: E/AndroidRuntime(544): at android.os.Handler.dispatchMessage(Handler.java:92)
02-21 12:54:13.150: E/AndroidRuntime(544): at android.os.Looper.loop(Looper.java:130)
02-21 12:54:13.150: E/AndroidRuntime(544): at android.app.ActivityThread.main(ActivityThread.java:3683)
02-21 12:54:13.150: E/AndroidRuntime(544): at java.lang.reflect.Method.invokeNative(Native Method)
02-21 12:54:13.150: E/AndroidRuntime(544): at java.lang.reflect.Method.invoke(Method.java:507)
02-21 12:54:13.150: E/AndroidRuntime(544): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
02-21 12:54:13.150: E/AndroidRuntime(544): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
02-21 12:54:13.150: E/AndroidRuntime(544): at dalvik.system.NativeStart.main(Native Method)
02-21 12:54:13.150: E/AndroidRuntime(544): Caused by: java.security.spec.InvalidKeySpecException: java.io.EOFException: DEF length 67 object truncated by 48
02-21 12:54:13.150: E/AndroidRuntime(544): at org.bouncycastle.jce.provider.JDKKeyFactory.engineGeneratePublic(JDKKeyFactory.java:92)
02-21 12:54:13.150: E/AndroidRuntime(544): at org.bouncycastle.jce.provider.JDKKeyFactory$RSA.engineGeneratePublic(JDKKeyFactory.java:396)
02-21 12:54:13.150: E/AndroidRuntime(544): at java.security.KeyFactory.generatePublic(KeyFactory.java:177)
02-21 12:54:13.150: E/AndroidRuntime(544): at com.google.android.vending.licensing.LicenseChecker.generatePublicKey(LicenseChecker.java:112)
据我所知这是BASE64_PUBLIC_KEY的问题,但我没有提供任何密钥,因为我没有上传apk,以及如何创建obb文件,我有大约100张图片,大约40mb,我需要在哪里把这些文件?