android - 未知权限 com.android.vending.BILLING

标签 android android-permissions

我正在尝试在我的应用程序中设置应用内结算功能。到目前为止,我遵循了本指南:

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.

Source

Google Play 应用仅授权给设备制造商。 事实上,您可以在互联网上找到盗版的 Google Play 应用程序,但不推荐这样做。

关于android - 未知权限 com.android.vending.BILLING,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15053868/

相关文章:

带有位图标记的 Android XML 可绘制圆角

android - 我可以在 Android Studio 中为选项菜单使用数据绑定(bind)吗?

java - get会阻塞ConcurrentHashMap吗?

java - android - 删除字符串和arrayList中的字符无法正常工作

android - 如何获取位置?

android - 在 Android 中调用 911

android - 无法在发布 apk 时访问远程 API,应用程序具有互联网权限

android - 为什么 Facebook 登录 session 返回授权异常?

android - 仅在单击按钮后请求相机权限

android - 在 Debug模式下自动授予运行时权限