如果您从设备中提取 Play 商店 APK,则可以对其进行反编译。我反编译了APK并简单搜索了你的错误消息。错误信息可以在类中找到com.google.android.finsky.utils.DocUtils
$ grep -lr "Item is not available"
com/google/android/finsky/utils/DocUtils.java
方法如下:
public static int getAvailabilityRestrictionResourceId(Document document) {
int restriction = document.getAvailabilityRestriction();
int resourceId = R.string.availability_restriction_generic;
switch (restriction) {
case 2:
resourceId = R.string.availability_restriction_country;
break;
case 8:
resourceId = R.string.availability_restriction_not_in_group;
break;
case 9:
if (document.getDocumentType() != 1) {
resourceId = R.string.availability_restriction_hardware;
break;
}
resourceId = R.string.availability_restriction_hardware_app;
break;
case 10:
resourceId = R.string.availability_restriction_carrier;
break;
case 11:
resourceId = R.string.availability_restriction_country_or_carrier;
break;
case 12:
resourceId = R.string.availability_restriction_search_level;
break;
case 21:
resourceId = R.string.availability_restriction_for_managed_account;
break;
case 22:
resourceId = R.string.availability_restriction_missing_permission;
break;
}
FinskyLog.d("Item is not available. Reason: " + restriction);
return resourceId;
}
在您的情况下,响应的限制为 9。这将得到两个字符串之一。如果我们使用反编译APK的资源ApkTool https://ibotpeaches.github.io/Apktool/我们可以看到这两个字符串的值。
<string name="availability_restriction_hardware">"Your device isn't compatible with this item."</string>
<string name="availability_restriction_hardware_app">"Your device isn't compatible with this version."</string>
方法getAvailabilityRestrictionResourceId(Document document)
在以下类中调用:
$ grep -lr getAvailabilityRestrictionResourceId | grep -v DocUtils
com/google/android/finsky/activities/AppsPermissionsActivity.java
com/google/android/finsky/billing/lightpurchase/OfferResolutionActivity.java
com/google/android/finsky/detailspage/WarningMessageModule.java
com/google/android/finsky/layout/WarningMessageSection.java
如果您提供有关何时记录此信息的信息,将会很有帮助。
问题仍然很模糊。通过在Google上搜索,有些人通过更改系统属性解决了类似的问题(最常见的是/system/build.prop
).
可能不是您希望的答案,但我希望我的研究对您有所帮助。