Android LVL:'无法再绑定到服务'(getApplicationContext()没有帮助)

时间:2013-04-15 11:44:15

标签: android android-lvl

  • 我复制了* {android-sdk} \ extras \ google \ play_licensing \ sample *,将* {android-sdk} \ extras \ google \ play_licensing \ library \ src *添加到 src dir复制的项目。
  • 修改了BASE64_PUBLIC_KEY,将其设置为我的一个密钥。
  • 在模拟器上添加了Google帐户,已登录。这是BASE64_PUBLIC_KEY对应的帐户。
  • 许可证测试响应设置为LICENSED
  • 试图改变

    new ServerManagedPolicy(this, ...)
    

    new ServerManagedPolicy(this.getApplicationContext(), ...)
    
  • 同样在LicenseChecker.checkAccess()尝试更改

    mContext.bindService()
    

    mContext.getApplicationContext().bindService()
    

.bindService()仍然返回false,并且在bindService()调用期间,logcat仍会报告警告:

Unable to start service Intent { act=com.android.vending.licensing.ILicensingService }: not found

有人可以参考我一个LVL的工作示例吗?

1 个答案:

答案 0 :(得分:0)

解决。对于项目和模拟器avd,必须使用“Google API”而不是“Android”。