我有这样的代码:GoogleApiAvailability.getErrorDialog()无法找到字符串资源
GoogleApiAvailability googleAPI = GoogleApiAvailability.getInstance();
String msg = getString(R.string.common_google_play_services_update_text);
Log.e(TAG, msg);
Dialog errDlg = googleAPI.getErrorDialog(MyActivity.this, result, 1111, listener);
在运行此,该字符串common_google_play_services_update_text
被正确地写入LogCat
,但getErrorDialog()
抛出此异常:
java.lang.NoSuchFieldError: No static field common_google_play_services_update_text of type I in class Lcom/google/android/gms/R$string; or its superclasses (declaration of 'com.google.android.gms.R$string' appears in /data/app/com.mygame-1/base.apk)
我该如何解决这个问题?
当代码运行时,字符串common_google_play_services_update_text被正确写入LogCat。所以它必须是getErrorDialog()的错误。 – activity