0

Android アプリケーションを実行すると、次のようなインストール エラーが発生しました。エミュレータにアプリをインストールできず、起動がキャンセルされました。私のアプリは、ユーザーに Google マップを表示します。

私のxmlファイル

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

       <com.google.android.maps.MapView
        android:id="@+id/mapview"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:apiKey="************************** "
        android:clickable="true" />
</LinearLayout>

私のマニフェスト

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.six"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="17" />

<uses-permission android:name="android.permission.INTERNET"/>
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.six.MainActivity"
            android:label="@string/app_name"         
     android:theme="@android:style/Theme.NoTitleBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
            <uses-library android:name="com.google.android.maps"/>    
    </application>   
</manifest>

メインファイル

package com.example.six;
import android.os.Bundle;
import android.view.Menu;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

public class MainActivity extends MapActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        MapView mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
    }


    @Override
    public boolean onCreateOptionsMenu(Menu menu) {
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.activity_main, menu);
        return true;}
        @Override
        protected boolean isRouteDisplayed() {
            return false;

    }


}

私のコードに何か問題があるのでしょうか、それとも私の日食に何か問題があるのでしょうか? Eclipse ジュノと SDK 4.2 があり、Google API レベル 17 を使用しています。

4

1 に答える 1

0

エミュレータ イメージは Google API を使用する必要があります

于 2012-12-09T17:32:27.440 に答える