我對APK擴展文件時,我特地到這些鏈接:APK擴展 - 錯誤測試
1)Steps to create APK expansion file
2)http://ankitthakkar90.blogspot.in/2013/01/apk-expansion-files-in-android-with.html
我從進口market_licensing,play_apk_expansion路徑sdk-path/extras/google
play_apk_expansion包含三個項目downloader_library,zip_file,downloader_sample。
現在我有SampleDownloaderActivity我在哪裏面臨的問題:
我還有尚未上傳在控制檯apk文件,我試圖測試SampleDownloaderActivity凸出,但我得到這個錯誤:
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文件,我有大約100MB左右的圖像,我需要把這些文件放在哪裏?
非常感謝我已經做到了,但現在我檢查通過手動添加的OBB文件中的SD卡,我得到這個錯誤,而我還沒有上傳應用程序到現在...我上傳 – Goofy 2013-02-26 11:05:33
之前只是測試http://stackoverflow.com/questions/15085904/android-expansion-files-resource-not-found-when-testing請看看這個。 – Goofy 2013-02-26 11:06:03
我遵循所有步驟上傳擴展文件和apk在谷歌播放開發者控制檯,並從日食運行我的項目。收到錯誤消息「下載失敗,因爲資源無法找到」。爲什麼這樣呢?我錯過了什麼? – 2014-01-29 09:22:38