相关疑难解决方法(0)

android:Inapp计费:错误响应:7:项目已经拥有

我正在学习为我的应用实施应用内结算,以便人们可以在按下捐赠按钮时捐赠$.

允许用户捐赠多次,即购买是消费品.

以下代码来自TrivalDrive示例和来自网络的一些教程:

码:

IabHelper mHelper;
static final String ITEM_SKU = "android.test.purchased"; 

@Override
protected void onCreate(Bundle savedInstanceState) 
{
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_in_app_billing);

    buy10Button = (Button) findViewById(R.id.buy10Button); 
    buy15Button = (Button) findViewById(R.id.buy15Button); 
    buy20Button = (Button) findViewById(R.id.buy20Button);      

    String base64EncodedPublicKey = "keykeykey";

    mHelper = new IabHelper(this, base64EncodedPublicKey);


    mHelper.startSetup(new IabHelper.OnIabSetupFinishedListener() 
    {
          public void onIabSetupFinished(IabResult result) 
          {
            if (!result.isSuccess()) 
            {
               Log.d(TAG, "In-app Billing setup failed: " + result);
               return;
            } 
            if (mHelper == null) 
            {
                return;
            }          
            Log.d(TAG, "In-app Billing is set up OK");
          }
    });     
}

public …
Run Code Online (Sandbox Code Playgroud)

android in-app-purchase in-app-billing

28
推荐指数
4
解决办法
4万
查看次数

标签 统计

android ×1

in-app-billing ×1

in-app-purchase ×1