Skobbler - ResourceNotFoundException for application label

自古美人都是妖i 提交于 2019-12-11 03:09:02

问题


In a basic Skobbler application, when calling InitializeSKMaps, a ResourceNotFoundException is thrown with a reference to "string resource ID #0x0". Why would this be?


回答1:


This can occur because the Skobbler SDK (2.3) in InitializeSKMaps is expecting your manifest to have a label as shown below (along with corresponding strings.xml entry), and not a "fixed" string.

<application android:label="@string/app_name">

It is doing something like:

int i = context.getApplicationInfo().labelRes;
String str1 = context.getString(i);



回答2:


This is an issue in 2.3 (and older versions) - the SDK uses the app_name string when reporting usage so that you get a better view in the analytics report. In 2.4 this will be handled more gracefully.

To fix this issue set in strings.xml this key : <string name="app_name">ApplicationName</string>



来源:https://stackoverflow.com/questions/27611880/skobbler-resourcenotfoundexception-for-application-label

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!