2013-04-15 101 views
0
  • 我複製* {android-sdk} \ extras \ google \ play_licensing \ sample *,加入* {android-sdk} \ extras \ google \ play_licensing \ library \ src *複製到src複製項目的目錄。
  • 已修改BASE64_PUBLIC_KEY,將其設置爲我的一個密鑰。
  • 在模擬器中添加Google帳戶,登錄。它是BASE64_PUBLIC_KEY對應的帳戶。
  • 許可證測試響應被設定爲許可
  • 嘗試變更Android LVL:'無法綁定到服務'再次(getApplicationContext()沒有幫助)

    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的工作的例子嗎?

回答

0

已解決。 'Google API'必須用於項目和模擬器avd,而不是'Android'。