这可能听起来很傻,但我不知道如何使应用程序工作。
就像教程说我下载了包一样,我找到了文件。问题是没有项目文件,我无法让它在 Eclipse 中工作。
有人使用示例应用程序吗?
我已经成功使用它......似乎有什么问题?下载文件后,通过选择“Newn Android Project”、“Create project form existing source”和“Finish”将项目带入 Eclipse。从那里,按照有关更改包名称等的说明进行操作...
据我所知,我通过 Android SDK 管理器下载的示例 Dungeons 应用内计费项目甚至无法编译(这似乎已修复,请参阅本消息后面的评论..)。
作为检查,我运行了一个 find 命令来搜索缺失的资源之一:
/cygdrive/k/android-sdk-windows/extras/google/play_billing $ find . -name '*.xml' -exec grep edit_payload_title {} \; -print
android:text="@string/edit_payload_title" />
./res/layout/edit_payload.xml
/cygdrive/k/android-sdk-windows/extras/google/play_billing $
如您所见,资源 @string_edit_payload_title 被引用一次,但从未在任何 xml 文件中定义。
Description Resource Path Location Type
error: Error: No resource found that matches the given name (at 'background' with value '@color/screen_background'). item_row.xml /Dungeons/res/layout line 20 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'background' with value '@color/screen_background'). main.xml /Dungeons/res/layout line 20 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'prompt' with value '@string/select_item'). main.xml /Dungeons/res/layout line 52 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'text' with value '@string/buy'). main.xml /Dungeons/res/layout line 47 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'text' with value '@string/edit_payload_title'). edit_payload.xml /Dungeons/res/layout line 25 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'text' with value '@string/edit_payload'). main.xml /Dungeons/res/layout line 58 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'text' with value '@string/items_for_sale'). main.xml /Dungeons/res/layout line 34 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'text' with value '@string/items_you_own'). main.xml /Dungeons/res/layout line 64 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'text' with value '@string/recent_transactions'). main.xml /Dungeons/res/layout line 80 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'textColor' with value '@color/error_message'). main.xml /Dungeons/res/layout line 28 Android AAPT Problem
** 更新 ** 我刚刚再次下载它,它似乎已解决。至少,它现在构建和部署.. 字符串定义现在似乎已经到位..
/cygdrive/k/android-sdk-windows/extras/google/play_billing $ find . -name '*.xml' -exec grep edit_payload_title {} \; -print
android:text="@string/edit_payload_title" />
./res/layout/edit_payload.xml
<string name="edit_payload_title">Edit the developer payload associated with this purchase</string>
./res/values/strings.xml