0

I have been trying to follow the documentation available here:

http://developer.android.com/google/play/expansion-files.html#Preparing

I have tried to follow what it says to do ...

If you're using Eclipse, create a project for each library and add it to your app:

Create a new Library Project for the License Verification Library and Downloader Library. For each library:

  • Begin a new Android project.

  • Select Create project from existing source and choose the library from the /extras/google/ directory (market_licensing/ for the License Verification Library or market_apk_expansion/downloader_library/ for the Downloader Library).

Of course there was no market_licensing or market_apk_expansion/downloader_library/ directories so I guess that I am suppose to use the play_licensing and market_apk_expansion/downloader_library directories. :/

  • Specify a Project Name such as "Google Play License Library" and "Google Play Downloader Library" Click Finish.

  • Add the License Verification Library to the Downloader Library's project properties (same process as steps 2 and 3 below).

  • Right-click the Android project in which you want to use APK expansion files and select Properties. In the Library panel, click Add to select and add each of the libraries to your application.

So yes I have read the docs and did my best to follow them, but now I get this error ...enter image description here

I am starting to think there is a bug in the latest Android SDK here is what the properties of the Downloader Lib look like right after installing and add to ecliplse ... enter image description here

... so I updated it like so ...

enter image description here

4

2 回答 2

2

为了纠正这个问题,我必须删除我已经导入的下载器库,然后使用 Android SDK 管理器卸载“Google Play APK 扩展库”,然后重新安装它。然后在 eclispe 中重新导入下载器库,然后“右键单击”下载器项目并删除坏库“market_licensing”并添加正确的库“play_licensing”

于 2013-03-24T05:03:03.880 回答
0

我解决了。

在这种情况下,导入的类Policy是基本的 google 类。

所以删除导入行import java.security.Policy

而不是添加导入行import com.google.android.vending.licensing.Policy

于 2014-10-09T07:37:49.207 回答