我们最近在Play商店上传了增加版的应用程序。 每当我们尝试从playtroe更新应用程序时,它崩溃并抛出ResourceNotFound异常,如下所示:
--------- beginning of system
12-25 15:17:26.608 21693-21693/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.ultimatix.grs.application, PID: 21693
android.content.res.Resources$NotFoundException: Drawable com.ultimatix.grs.application:string/availability_united_states_with_asterisk with resource ID #0x7f0600b9
Caused by: android.content.res.Resources$NotFoundException: File <font color=#FF0000>* </font>Available to join TCS on from drawable resource ID #0x7f0600b9
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:729)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:575)
at android.content.res.Resources.getDrawable(Resources.java:767)
at android.support.v7.widget.ResourcesWrapper.getDrawable(Unknown Source)
at android.content.Context.getDrawable(Context.java:525)
at android.support.v4.content.ContextCompatApi21.getDrawable(Unknown Source)
at android.support.v4.content.ContextCompat.getDrawable(Unknown Source)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(Unknown Source)
at android.support.v7.widget.AppCompatDrawableManager.getDrawable(Unknown Source)
at android.support.v7.widget.AppCompatImageHelper.setImageResource(Unknown Source)
at android.support.v7.widget.AppCompatImageView.setImageResource(Unknown Source)
at com.tcs.grs.grsnavdrawer.a.a.a(Unknown Source)
at com.tcs.grs.grsnavdrawer.a.a.onBindViewHolder(Unknown Source)
at android.support.v7.widget.RecyclerView$Adapter.onBindViewHolder(Unknown Source)
at android.support.v7.widget.RecyclerView$Adapter.bindViewHolder(Unknown Source)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(Unknown Source)
at android.support.v7.widget.RecyclerView$Recycler.getViewForPosition(Unknown Source)
at android.support.v7.widget.LinearLayoutManager$LayoutState.next(Unknown Source)
at android.support.v7.widget.LinearLayoutManager.layoutChunk(Unknown Source)
at android.support.v7.widget.LinearLayoutManager.fill(Unknown Source)
at android.support.v7.widget.LinearLayoutManager.onLayoutChildren(Unknown Source)
at android.support.v7.widget.RecyclerView.dispatchLayoutStep2(Unknown Source)
但是这个资源是可用的。其次,如果我没有更新应用程序而是直接下载新版本,那么它的工作正常。
我猛烈地找出根本原因,并没有得到同样的结果。 如果有人可以提出建议,那将非常有帮助。 注意:这是项目中未使用的资源。
这是@ string.xml
<string name="personal_detail_age_with_asterisk"><![CDATA[<font color=#FF0000>* </font><font color=#bdbdbe>Age</font>]]></string>
<string name="date_label_with_asterisk"><![CDATA[<font color=#FF0000>* </font><font color=#bdbdbe>Date</font>]]></string>
<string name="availability_united_states">Available to join TCS on</string>
<string name="availability_united_states_with_asterisk"><![CDATA[<font color=#FF0000>* </font>Available to join TCS on]]></string>
<string name="availability_united_states_disabled"><![CDATA[<font color=#FF0000>* </font><font color=#bdbdbe>Available to join TCS on</font>]]></string>
<string name="under_age_label_united_states">If you are under the age of 18 years, can you provide a work permit ?</string>
<string name="under_age_label_united_states_with_asterisk"><![CDATA[<font color=#FF0000>* </font>If you are under the age of 18 years, can you provide a work permit ?]]></string>
<string name="authorized_to_work_united_states">If an offer of employment is extended to you, will you be able to demonstrate that you are authorized to work in the U.S ?</string>
<string name="authorized_to_work_united_states_with_asterisk"><![CDATA[<font color=#FF0000>* </font>If an offer of employment is extended to you, will you be able to demonstrate that you are authorized to work in the U.S ?]]></string>
<string name="military_training_usa">List any military training or experience that you feel relevant to the position you are applying to</string>
请找到所需的gradle
行 minSdkVersion 17
targetSdkVersion 23
versionCode 3
versionName "1.2"
multiDexEnabled = true
}
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
buildTypes {
release {
minifyEnabled true
debuggable false
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
minifyEnabled false
debuggable true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config1
}
}
答案 0 :(得分:2)
这听起来很奇怪。你能检查一下你通过更新和安装新版本获得的APK是否相同?
您可以按照this stackoverflow answer。
中的说明将APK从设备上拉下来如果这两个APK相同,那么这真的很奇怪。如果两个APK不同,则表明Google Play商店中存在错误,您应该通过Google Play控制台与Google Play开发人员支持联系。他们会非常认真对待并升级到适当的人。