Androidアクティビティでjsoup(1.3.3)を使用してHTMLを解析しようとしています。このコードを呼び出すと
Jsoup.connect("http://www.google.com").get();
android 2.1および2.2では正常に動作しますが、1.6では「java.io.IOException:403ErrorloadingURL」が表示されます。
エミュレータを使用してこれをテストしていますが、AdMob広告も1.6では表示されませんが、2.0、2.1、2.2では機能します。
1.6エミュレーターでWebブラウザーを使用すると機能するので、問題はコードのどこかにあると確信しています。
1.6ではインターネットアクセスに必要で、2.0以降では必要のない追加の許可はありますか?
これが私のマニフェストファイルの構造ですが、uses-permissionタグの位置は効果がありますか?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.foo.bar"
android:versionCode="1"
android:versionName="1.0"
android:installLocation="auto">
<application android:icon="@drawable/icon"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar"
android:name="blahblah"
android:description="@string/app_desc">
<activity android:label="@string/app_name" android:name=".activities.MainMenu">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activities.FullList" android:label="@string/app_name"/>
<!-- The application's publisher ID assigned by AdMob -->
<meta-data android:value="blahblahblah" android:name="ADMOB_PUBLISHER_ID" />
</application>
<uses-sdk android:minSdkVersion="4"/>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
</manifest>
Jsoup.connect()メソッドを使用し、同じ1.6エミュレーターで正常に動作するhello world画面を使用して、新しいプロジェクトを最初から作成しようとしました。コードの問題である必要がありますが、理解できません。 。