我正在尝试在我的应用程序中设置应用内结算功能。到目前为止,我遵循了本指南:
http://developer.android.com/training/in-app-billing/preparing-iab-app.html
但是当我指定结算权限时
<uses-permission android:name="com.android.vending.BILLING" />
LogCat 中出现以下消息:
Unknown permission com.android.vending.BILLING in package org.noi.activity
每次我启动我的应用程序时。
正如我上面提到的,我在我的 AndroidManifest.xml 中注册了计费权限,就像在 tutorial 中一样。 :
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.noivr.activity"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:targetSdkVersion="17" android:minSdkVersion="9"/>
<uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.CALL_PHONE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
...
</manifest>
我也是copied the In-app billing libraries进入我的项目,该项目现在具有以下结构:
- com.android.vending.billing
- com.android.vending.billing.util
- org.noi.activity
- org.noi.impl
- org.noi.const
最佳答案
你在模拟器上测试吗?
必须安装最新版本的 Google Play。
编辑:
不,这不可能。
You cannot use the Android emulator to test In-app Billing. The device you use for testing must run a standard version of the Android 1.6 or later platform (API level 4 or higher), and have the most current version of the Google Play application installed.
Google Play 应用仅授权给设备制造商。 事实上,您可以在互联网上找到盗版的 Google Play 应用程序,但不推荐这样做。
关于android - 未知权限 com.android.vending.BILLING,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15053868/