1

これはばかげているように聞こえるかもしれませんが、アプリケーションを機能させる方法がわかりません。

アプリ内課金のチュートリアル

チュートリアルでパッケージをダウンロードしたと書かれているように、ファイルが見つかりました。問題は、プロジェクト ファイルがなく、Eclipse で動作させることができないことです。

サンプルアプリを使用した人はいますか?

4

2 に答える 2

2

私はそれを正常に使用しました...何が問題なのですか?ファイルをダウンロードしたら、[Newn Android Project]、[Create project form existing source]、[Finish] を選択して、プロジェクトを Eclipse に取り込みます。そこから、パッケージ名の変更などに関する指示に従ってください...

于 2011-09-07T12:05:59.437 に答える
0

私が判断できる限り、Android SDK Managerを介してダウンロードしたサンプルのDungeonsアプリ内課金プロジェクトは、コンパイルすらされていません(これは修正されたようです。このメッセージの後半にある私のコメントを参照してください)。

チェックとして、findコマンドを実行して、不足しているリソースの1つを検索しました。

 /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
于 2012-03-28T15:23:29.930 に答える