這可能聽起來很愚蠢,但我不知道如何使應用程序工作。運行Android應用內結算示例應用
就像教程說我下載的軟件包,我找到的文件。問題是沒有項目文件,我不能讓它在eclipse中工作。
任何人使用的示例應用程序?
這可能聽起來很愚蠢,但我不知道如何使應用程序工作。運行Android應用內結算示例應用
就像教程說我下載的軟件包,我找到的文件。問題是沒有項目文件,我不能讓它在eclipse中工作。
任何人使用的示例應用程序?
我已經成功地使用了它......看起來是什麼問題?一旦你下載了這些文件,通過選擇「Newn Android Project」,「Create project form existing source」和「Finish」,將項目帶入Eclipse。從那裏,按照有關更改包名稱等方面的指示...
據我所知,我通過Android SDK Manager下載的樣本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
通常的樣品以正在進行的「新的Android項目 - >從現有的樣本項目」建成,然後選擇一個API級別。缺少的項目文件可以防止這種情況,但從現有源創建應該可以正常工作。 –