Pour autant que je sache, l'exemple de projet de facturation in-app Dungeons que j'ai téléchargé via Android SDK Manager, ne compile même pas (cela semble avoir été corrigé, voir mes commentaires plus tard dans ce message ..).
Pour vérifier, j'ai couru une commande find pour rechercher une des ressources manquantes:
/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 $
Comme vous pouvez le voir, la @string_edit_payload_title des ressources est référencé une fois, mais jamais défini dans l'une des xml fichiers ..
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
** Mise à jour ** Je viens de télécharger à nouveau et il semble être résolu. Au moins, il construit et déploie maintenant .. Et les définitions de chaîne semblent être en place maintenant ..
/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
Habituellement, les échantillons sont construits en allant « New Android Project -> Créer un projet à partir de l'échantillon existant », puis en sélectionnant un niveau d'API. Le fichier de projet manquant empêcherait cela, mais la création à partir d'une source existante devrait fonctionner correctement. –