`

java.lang.NoClassDefFoundError: com.google.android.location.NetworkLocationProvi

阅读更多
把NetworkLocation.apk放进android 2.3的机器上跑,会出现这样java.lang.NoClassDefFoundError: com.google.android.location.NetworkLocationProvider这样的error,导致SystemServer dead,而机器就会一直重启。一开始会想NetworkLocationProvider怎么会没找到呢?
实际上我们在LocationManagerService中会发现mNetworkLocationProviderPackageName = resources.getString(
                com.android.internal.R.string.config_networkLocationProvider);
那我们看看这个config.xml:
<!-- Component name of the service providing network location support. -->
    <string name="config_networkLocationProvider">@null</string>
所以我们要修改这里:
frameworks/base/core/res/res/values/config.xml
<string name="config_networkLocationProvider">com.google.android.location.NetworkLocationProvider</string>
参考:http://www.eoeandroid.com/forum.php?mod=viewthread&tid=53368&archiver=1

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics