【发布时间】:2015-03-11 10:06:37
【问题描述】:
我的一个应用在三星 S5(准确地说是 SM G900V)上崩溃了,但有以下例外:
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
【问题讨论】:
-
res/drawable-xxhdpi-v4目录下有common_signin_btn_icon_disabled_focus_light.9.png文件吗?
-
我首先没有
drawable-xxhdpi-v4目录。在谷歌上搜索common_signin_btn_icon_disabled_focus_light.9.png让我觉得这是谷歌播放服务访问的一些内部资源。 -
您的应用中是否有 Admob 并使用 ProGuard 进行了混淆?
-
是的,该应用似乎使用了一个非常旧的支持库,并且 Google Play 服务已弃用它以获得更高的分辨率。无法从 android.support.v4.app 升级?
-
问题是
R.java中的索引是否正确对应,我的意思是资源ID。
标签: android drawable samsung-mobile