2012-08-08 37 views
16

我試過許可示例。它說「應用程序錯誤= 3」。 我在developer.android.com找到了一張授權響應碼,但是3號如何對應上面的列表?那代碼是什麼意思?Android授權示例返回代碼3.這是什麼意思?

+0

這個環節的possibel重複 http://stackoverflow.com/questions/5526889/android-license-check-going-straight-to-applicationerror – 2012-08-08 10:09:32

+0

沒有answaer我的問題:什麼每次效應初探代碼裝置樣品。 – nms 2012-08-08 10:21:57

回答

34

退房源代碼com.android.vending.licensing.LicenseValidator

/** 
* Contains data related to a licensing request and methods to verify 
* and process the response. 
*/ 
class LicenseValidator { 
    private static final String TAG = "LicenseValidator"; 

    // Server response codes. 
    private static final int LICENSED = 0x0; 
    private static final int NOT_LICENSED = 0x1; 
    private static final int LICENSED_OLD_KEY = 0x2; 
    private static final int ERROR_NOT_MARKET_MANAGED = 0x3; 
    private static final int ERROR_SERVER_FAILURE = 0x4; 
    private static final int ERROR_OVER_QUOTA = 0x5; 

    private static final int ERROR_CONTACTING_SERVER = 0x101; 
    private static final int ERROR_INVALID_PACKAGE_NAME = 0x102; 
    private static final int ERROR_NON_MATCHING_UID = 0x103; 

    ... ... 

「應用程序錯誤= 3」 是指ERROR_NOT_MARKET_MANAGED,檢查答案here,看看如何對付它。

+0

非常感謝............! – nms 2012-08-09 11:10:19

+0

但是那些仍處於開發階段的應用程序呢? 這些應用肯定不是市場管理的應用,對吧? – milosmns 2015-01-06 17:57:55