子presourceFile不能被解析为一个类型 [英] ZipResourceFile cannot be resolved to a type

查看:255
本文介绍了子presourceFile不能被解析为一个类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图重写我的应用程序APK扩展文件的工作。我一直在关注这里的文档 http://developer.android.com/google/播放/膨胀files.html 。我已经下载了...

I am trying to rewrite my App to work with APK Expansion files. I have been following the documentation here http://developer.android.com/google/play/expansion-files.html . I have downloaded the ...

...但是当我加入这个code ...

... but when I added this code ...

public static Uri getTrackUriFromZipFile ( int track ) {
    // Get a ZipResourceFile representing a specific expansion file
    ZipResourceFile expansionFile = new ZipResourceFile(filePathToMyZip);
}

...我得到错误信息子presourceFile不能被解析为一个类型 :(哭泣哭吧哭吧

Editted ......嗯,也许我必须做这样可怕的事情...

Editted ... Hmmm maybe I have to do something awful like this ...

如果您正在使用Eclipse,为每个库项目,并把它添加到您的应用程序:

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

有关授权验证库和下载档案库创建新库项目。对于每个库:
开始一个新的Andr​​oid项目。
选择创建从现有的源项目,并从/演员/​​谷歌/目录中选择库(market_​​licensing /的授权验证库或market_​​apk_expansion / downloader_library /在下载档案库)。
指定项目名称,如谷歌播放许可证库和谷歌播放下载档案库
点击完成。
注:下载档案库取决于授权验证库。一定要添加授权验证库的下载档案库的项目属性(相同的过程,步骤2和表3)。
右键单击要使用APK扩展文件,并选择属性的Andr​​oid项目。
在库面板中,点击添加,选择和每个库添加到应用程序。

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). Specify a Project Name such as "Google Play License Library" and "Google Play Downloader Library" Click Finish. Note: The Downloader Library depends on the License Verification Library. Be sure to 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.

http://developer.android.com/google/play/膨胀files.html#AboutLibraries

推荐答案

如果您正在使用Eclipse,为每个库项目,并把它添加到您的应用程序:

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

有关授权验证库和下载档案库创建新库项目。对于每个库:开始一个新的Andr​​oid项目。选择创建从现有的源项目,并从/演员/​​谷歌/目录中选择库(market_​​licensing /的授权验证库或market_​​apk_expansion / downloader_library /在下载档案库)。指定项目名称,如谷歌播放许可证库和谷歌播放下载档案库单击完成。注:下载档案库取决于授权验证库。一定要添加授权验证库的下载档案库的项目属性(相同的过程,步骤2和表3)。右键单击要使用APK扩展文件,并选择属性的Andr​​oid项目。在库面板中,点击添加,选择和每个库添加到应用程序。

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). Specify a Project Name such as "Google Play License Library" and "Google Play Downloader Library" Click Finish. Note: The Downloader Library depends on the License Verification Library. Be sure to 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.

http://developer.android.com/google/play/膨胀files.html#AboutLibraries

而实际上我只是忽略了对位指定Prject名称,如...我只是使用了默认名称的GUI想出了。

And actually I just ignored the bit about "Specify a Prject Name such as ..." I just used the default names the gui came up with.

这篇关于子presourceFile不能被解析为一个类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆