- 我复制了*{android sdk}\extrass\google\play_licensing\sample*,并将*{android sdk}\extras\google\play-licensing\library\src*添加到复制项目的src目录中
- 修改了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的工作示例吗?
已解决。'对于项目和模拟器avd,必须使用Google API而不是"Android"。