マップを機能させることができません。実際、Eclipse によると、「com」の下に「google」パッケージはありません。API レベル 15 の Google API をインストールしています。設定はしていますminSdkVersion="10"
が、ビルド ターゲットは 15 です。
これが私のマニフェストです。動作させるために .jar を追加する必要がありますか?
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.arn.log"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="10" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@android:style/Theme.DeviceDefault" >
<uses-library android:name="com.google.android.maps" />
<activity
android:name=".LActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Map"
android:label="@string/app_name2" />
</application>
</manifest>
コンパイルされない私のアクティビティ。Ecilpse は、MapActivity のインポートでもエラーを表示します。
package com.arn.log;
import android.os.Bundle;
import com.google.android.maps.MapActivity;
public class Map extends MapActivity {
@Override
protected boolean isRouteDisplayed() {
return false;
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
MapView mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
}
}
API 15 用に rev 2 の Google API をインストールしました。非常に長い間、DOS ウィンドウが開いたままになっていました。閉じるとエラーが表示されましたが、現在、SDK マネージャーは Google API が「インストールされている」と表示しています。これが悪いインストールではないことを確認するにはどうすればよいですか?