-2

昨日、日食を更新しました。Eclipse を更新する前は、アプリケーションは正しく実行されていましたが、アプリケーションを実行するときに Eclipse を更新した後、エラーが発生しました。

マイログキャット

E/AndroidRuntime(2161): ... 11 more 11-02 04:50:32.609: E/AndroidRuntime(2161): 原因: java.lang.IllegalStateException: アプリの AndroidManifest.xml のメタデータ タグが正しい値を持っています。4030500 が必要ですが、0 が見つかりました。要素内に次の宣言が必要です: 11-02 04:50:32.609: E/AndroidRuntime(2161): at com.google.android.gms.common.GooglePlayServicesUtil.n(Unknown Source) 11-02 04:50:32.609: E/AndroidRuntime(2161): com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable (不明なソース) 11-02 04:50:32.609: E/AndroidRuntime(2161): com.google.android.gms.maps.internal.qv(不明なソース) 11-02 04:50:32.609: E/AndroidRuntime(2161): com.google.android.gms.maps.internal.qu(不明)出典) 11-02 04:50:32.609: E/AndroidRuntime(2161): android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:676) 11-02 04:50:32.609: E/AndroidRuntime(2161): ... 21 11-02 04:50: 45.858: I/Process(2161): シグナルを送信しています。PID: 2161 SIG: 9

私の活動.java

package org.lucasr.twowayview;

import com.google.android.gms.common.ConnectionResult; 
import com.google.android.gms.common.GooglePlayServicesUtil; 
import com.google.android.gms.maps.CameraUpdateFactory; 
import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.SupportMapFragment; 
import com.google.android.gms.maps.model.LatLng;

import android.content.Context; 
import android.location.Criteria; 
import android.location.Location; 
import android.location.LocationManager; 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
import android.support.v4.app.FragmentManager; 
import android.view.Menu;

public class MainMapActivity extends FragmentActivity 
{ 
    private GoogleMap map; 
    @Override 
    protected void onCreate(Bundle savedInstanceState) 
    { 
        super.onCreate(savedInstanceState); 
        setContentView(R.layout.activity_main_map); 
        setupMapIfNeeded(); 
    }

    private void setupMapIfNeeded() 
    {
        if(map == null) 
        { 
            FragmentManager fragmentManager = getSupportFragmentManager(); 
            SupportMapFragment supportMapFragment = (SupportMapFragment) fragmentManager.findFragmentById(R.id.maps); 
            map = supportMapFragment.getMap(); 
            if(map != null) 
            { 
                setupMap(); 
            } 
        } 
    } 
    private void setupMap() 
    { 
        map.setMyLocationEnabled(true); 
        moveToMyLocation(); 
    } 
    private void moveToMyLocation() 
    { 
        LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE); 
        Criteria criteria = new Criteria();  
        location = locationManager.getLastKnownLocation(locationManager.getBestProvider(criteria, false)); 
        if ( location != null) 
        { 
            map.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(location.getLatitude(), location.getLongitude()), 13)); 
        } 
    } 
    @Override public boolean onCreateOptionsMenu(Menu menu) 
    { 
        // Inflate the menu; this adds items to the action bar if it is present.
        getMenuInflater().inflate(R.menu.main_map, menu); 
        return true; 
    }

    protected void onResume() 
    { 
        super.onResume(); 
        int resCode = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getApplicationContext()); 
        if( resCode != ConnectionResult.SUCCESS) 
        { 
            GooglePlayServicesUtil.getErrorDialog(resCode, this, 1);
        } 
    } 
}

マニフェスト.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.vindypratama.tempatwisata"
    android:versionCode="1"
    android:versionName="1.0" />
<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.vindypratama.tempatwisata.permission.MAPS_RECEIVE" />
<permission
    android:name="com.vindypratama.tempatwisata.permission.MAPS_RECEIVE"
    android:protectionLevel="signature" >

</permission><uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />
<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >

    <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="AIzaSyDcosD0fQsQcYCEiDDkRxP6ZRACPf-svaw" />

    <activity
        android:name="com.vindypratama.tempatwisata.MainMapActivity"
        android:label="@string/app_name" >

        <intent-filter>

            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

</application><manifest>

</manifest>

xml ファイル:

<fragment 
    android:id="@+id/maps"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    class="com.google.android.gms.maps.SupportMapFragment"
    />

4

2 に答える 2