【发布时间】:2011-09-25 15:24:49
【问题描述】:
我正在创建一个简单的网络服务。
但它会产生如下所示的错误
09-25 20:42:56.732: ERROR/LocationManagerService(64): requestUpdates got exception:
09-25 20:42:56.732: ERROR/LocationManagerService(64): java.lang.IllegalArgumentException: provider=network
09-25 20:42:56.732: ERROR/LocationManagerService(64): at com.android.server.LocationManagerService.requestLocationUpdatesLocked(LocationManagerService.java:861)
09-25 20:42:56.732: ERROR/LocationManagerService(64): at com.android.server.LocationManagerService.requestLocationUpdates(LocationManagerService.java:831)
09-25 20:42:56.732: ERROR/LocationManagerService(64): at android.location.ILocationManager$Stub.onTransact(ILocationManager.java:79)
09-25 20:42:56.732: ERROR/LocationManagerService(64): at android.os.Binder.execTransact(Binder.java:287)
09-25 20:42:56.732: ERROR/LocationManagerService(64): at dalvik.system.NativeStart.run(Native Method)
java和XML代码如下所示
package com.webview;
import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;
public class WebApplicationActivity extends Activity {
WebView webView1,webView2;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
webView1 = (WebView) findViewById(R.id.webView1);
webView1.loadUrl("http://google.com");
// webView2 = (WebView) findViewById(R.id.webView2);
// webView2.loadData("<html><head></head><body>Hello</body></html>", "text/html", null);
}
}
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="fill_parent"
android:layout_height="wrap_content">
<android.webkit.WebView android:layout_width="fill_parent"
android:id="@+id/webView1" android:layout_height="300dp"
android:layout_weight="1"></android.webkit.WebView>
<!-- <android.webkit.WebView android:id="@+id/webView2"
android:layout_width="fill_parent" android:layout_height="300dp"
android:layout_weight="1">
</android.webkit.WebView> -->
</LinearLayout>
【问题讨论】:
-
向我们展示 requestLocationUpdates() 代码
-
@Yashwanth Kumar:这是所有应用程序代码,没有任何剩余..
标签: android android-widget android-manifest