gpt4 book ai didi

android - 三星上的资源$NotFoundException

转载 作者:IT老高 更新时间:2023-10-28 23:35:48 27 4
gpt4 key购买 nike

我的一个应用在三星 S5(准确地说是 SM G900V)上崩溃了,但有以下异常(exception):

android.content.res.Resources$NotFoundException: File res/drawable-xxhdpi-v4/common_signin_btn_icon_disabled_focus_light.9.png from drawable resource ID #0x7f0200e5
at android.content.res.Resources$CRunnable_openmp.doOpenMP(Resources.java:1097)
at android.content.res.Resources$__ompClass0.__doWork(Resources.java:1029)
at com.samsung.javaomp.runtime.__OMPThread.run()
Caused by: java.io.FileNotFoundException: res/drawable-xxhdpi-v4/common_signin_btn_icon_disabled_focus_light.9.png
at android.content.res.AssetManager.openNonAssetNative(AssetManager.java)
at android.content.res.AssetManager.openNonAsset(AssetManager.java:408)
at android.content.res.Resources$CRunnable_openmp.doOpenMP(Resources.java:1092)
at android.content.res.Resources$__ompClass0.__doWork(Resources.java:1029)
at com.samsung.javaomp.runtime.__OMPThread.run()

似乎应用无法从 android 操作系统访问某些可绘制对象。任何想法如何解决它?

更新:可能是这部分导致它,但这只是一个猜测:

Integer resultCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(this);
if (resultCode == ConnectionResult.SERVICE_MISSING ||
resultCode == ConnectionResult.SERVICE_DISABLED ||
resultCode == ConnectionResult.SERVICE_VERSION_UPDATE_REQUIRED) {
Dialog dialog = GooglePlayServicesUtil.getErrorDialog(resultCode, this, 0);
if (dialog != null) {
//This dialog will help the user update to the latest GooglePlayServices
dialog.show();
}
}

更新:解压apk文件会显示这个文件res\drawable-xxhdpi-v4\common_signin_btn_icon_disabled_focus_light.9.png

enter image description here

最佳答案

这可能与 Android Gradle 插件 <= 1.1.0 中的一个错误有关: https://code.google.com/p/android/issues/detail?id=79325

同时,你可以将shrinkResources设置为false,问题就解决了。

关于android - 三星上的资源$NotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28983622/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com