2011-07-04 2 views
1

Cela semblera probablement idiot mais je n'ai aucune idée de comment faire fonctionner l'application.Exécution de l'application de facturation via l'application android aplication

tutorial for in-app billing

Tout comme le tutoriel dit que je téléchargé le paquet, j'ai trouvé les fichiers. Le problème est qu'il n'y a pas de fichier de projet et je n'arrive pas à le faire fonctionner dans eclipse.

Quelqu'un a utilisé l'exemple d'application?

Répondre

2

Je l'ai utilisé avec succès ... quel semble être le problème? Une fois que vous avez téléchargé les fichiers, amenez le projet dans Eclipse en sélectionnant «Nouveau projet Android», «Créer une source de formulaire de projet» et «Terminer». De là, suivez les instructions concernant le changement du nom du paquet, etc ...

+0

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. –

0

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 
Questions connexes