【GTS6.0_r1】 com.google.android.xts.permissions.InitialRuntimePermissionStateTest — testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk fail

[DESCRIPTION]

GTS 3.0R2在M平台上运行时会报如下错误:
com.google.android.xts.permissions.InitialRuntimePermissionStateTest
— testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk fail junit.framework.AssertionFailedError: testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk errors: Package:com.mediatek.voicecommand.overlay uses runtime permissions but doesn’t target 23+ SDK

com.google.android.xts.permissions.InitialRuntimePermissionStateTest
— testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk fail junit.framework.AssertionFailedError: testAllSystemAppsUsingRuntimePermissionsTargetMncAndAboveSdk errors: Package:com.mobisystems.office uses runtime permissions but doesn’t target 23+ SDK

[SOLUTION]

首先, runtime permission 在 M 版之後 GTS 會有這樣的測試
如果有使用 M 的 platform 預安裝的 apk 需要升級到SDK23 才可以使用 runtime permission
所以报此类错误时,请确认报错的package是否都有支持SDK23
1. 对于有源码的APK,需要在AndroidManifest.xml里边设置android:targetSdkVersion=”23″
2. 对于没有源码的apk,确认无源码的APK的来源(如第三方APK,或GMS APK,或MTK),请该developer提供支持SDK23之APK再包入load重新烧img.即可pass.

作者: RESSRC

个人资源站

发表评论

电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.