我正在嘗試重寫我的應用以使用APK擴展文件。我一直在關注這裏的文檔http://developer.android.com/google/play/expansion-files.html。我已經下載了...ZipResourceFile無法解析爲某種類型
...但是當我加入這個代碼...
public static Uri getTrackUriFromZipFile (int track) {
// Get a ZipResourceFile representing a specific expansion file
ZipResourceFile expansionFile = new ZipResourceFile(filePathToMyZip);
}
...我收到錯誤消息ZipResourceFile cannot be resolved to a type
:(哭泣哭吧哭吧
Editted ......嗯,也許我必須做一些可怕的是這樣的...
如果你正在使用Eclipse,爲每個庫項目,並添加它到您的應用程序:
爲許可證驗證庫和下載程序庫創建一個新的庫項目。對於每個庫: 開始一個新的Android項目。 選擇從現有源創建項目,並從/ extras/google /目錄中選擇庫(market_licensing /用於許可證驗證庫或market_apk_expansion/downloader_library /用於下載程序庫)。 指定項目名稱,例如「Google Play許可證庫」和「Google Play下載器庫」 單擊完成。 注意:下載程序庫依賴於許可證驗證庫。請確保將許可證驗證庫添加到Downloader庫的項目屬性(與以下步驟2和3相同的過程)。 右鍵單擊您想要使用APK擴展文件的Android項目,然後選擇「屬性」。 在「庫」面板中,單擊「添加」以選擇並將每個庫添加到應用程序。
http://developer.android.com/google/play/expansion-files.html#AboutLibraries
是的。再次謝謝特德! – 2013-03-20 01:53:11
特德!我需要你的幫助!你可以看看http://stackoverflow.com/questions/15539455/apk-expansion-file-exppath-does-not-exists謝謝! – 2013-03-21 04:26:59
特德!我需要你的幫助。你可以看看http://stackoverflow.com/questions/15594964/not-licensed-cannot-be-resolved-or-is-not-a-field謝謝! – 2013-03-24 03:58:14