java.lang.IllegalStateException:应用程序的AndroidManifest.xml中的元数据标记没有正确的值

时间:2016-04-26 11:07:25

标签: java android xml google-maps android-manifest

当我在谷歌地图上工作时,我正面临着在manifest.XML中遇到问题的问题,我不知道是什么问题,因为我在同一个问题上阅读了很多答案,但都是关于你必须将你的元标记放在我已经在做的活动标记之外。

的AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest
    android:versionCode="1"
    android:versionName="1.0"
    xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.vikrant.safeshelter">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="com.example.vikrant.safeshelter.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <!-- Required to show current location -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <permission
        android:name="com.example.vikrant.safeshelter.permission.MAPS_RECEIVE"
        android:protectionLevel="signature" />

    <!-- Required OpenGL ES 2.0. for Maps V2 -->
    <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true" />
    <uses-sdk
        android:minSdkVersion="12"
        android:targetSdkVersion="17" />

    <application
        android:allowBackup="true"
        android:icon="@drawable/logo"
        android:label="@string/app_name"
        android:supportsRtl="true"

        android:theme="@style/Theme.AppCompat.Light">
        <!--<provider android:authorities="com.facebook.app.FacebookContentProvider598739380302911"-->
            <!--android:name="com.facebook.FacebookContentProvider"-->
            <!--android:exported="true"/>-->
        <!--<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>-->
        <!--<activity android:name="com.facebook.FacebookActivity"-->
            <!--android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"-->
            <!--android:theme="@android:style/Theme.Translucent.NoTitleBar"-->
            <!--android:label="@string/app_name" />-->

        <activity
            android:name=".Bottom_Tabs_Activity"
            android:theme="@style/AppTheme"
            >
            <intent-filter>
                <action
                    android:name="android.intent.action.MAIN" />

                <category

                    android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".Login.MainActivity"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
                <action
                    android:name="android.intent.action.VIEW" />

            </intent-filter>
        </activity>
        <activity
            android:name=".Login.Logout_Temp_Activity"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
                <action
                    android:name="android.intent.action.VIEW" />

            </intent-filter>
        </activity>

        <activity
            android:name=".Login.signup"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
                <action
                    android:name="android.intent.action.VIEW" />

            </intent-filter>
        </activity>
        <activity
            android:name=".Login.OTP_Activity"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
                <action
                    android:name="android.intent.action.VIEW" />
            </intent-filter>
        </activity>
        <!--<activity-->
            <!--android:name=".Bottom_Tabs_Activity"-->
            <!--android:theme="@style/Theme.AppCompat.NoActionBar">-->
            <!--<intent-filter>-->
                <!--<action-->
                    <!--android:name="android.intent.action.VIEW" />-->
            <!--</intent-filter>-->
        <!--</activity>-->
        <activity
            android:name=".Login.ForgetPassword_Activity"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
                <action
                    android:name="android.intent.action.VIEW" />
            </intent-filter>
        </activity>
        <activity
            android:name=".Login.NewPassword"
            android:theme="@style/Theme.AppCompat.NoActionBar">
            <intent-filter>
                <action
                    android:name="android.intent.action.VIEW" />
            </intent-filter>
        </activity>
        <uses-library android:name="com.google.android.maps" />
        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyBppAiLER2jGHWCk3kgU0fhV11vQl0XHic" />
        <meta-data android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
    </application>


</manifest>

logcat的

at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
Caused by: java.lang.IllegalStateException: The meta-data tag in your app's AndroidManifest.xml does not have the right value.  Expected 8487000 but found 4323000.  You must have the following declaration within the <application> element:     <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
 at com.google.android.gms.common.zze.zzan(Unknown Source)
 at com.google.android.gms.common.zze.isGooglePlayServicesAvailable(Unknown Source)
 at com.google.android.gms.common.GooglePlayServicesUtil.isGooglePlayServicesAvailable(Unknown Source)
 at com.google.android.gms.maps.internal.zzad.zzaP(Unknown Source)
 at com.google.android.gms.maps.internal.zzad.zzaO(Unknown Source)
 at com.google.android.gms.maps.MapsInitializer.initialize(Unknown Source)
 at com.google.android.gms.maps.SupportMapFragment$zzb.zzzW(Unknown Source)
 at com.google.android.gms.maps.SupportMapFragment$zzb.zza(Unknown Source)
 at com.google.android.gms.dynamic.zza.zza(Unknown Source)
 at com.google.android.gms.dynamic.zza.onInflate(Unknown Source)
 at com.google.android.gms.maps.SupportMapFragment.onInflate(Unknown Source)
 at android.support.v4.app.Fragment.onInflate(Fragment.java:1142)
 at android.support.v4.app.FragmentManagerImpl.onCreateView(FragmentManager.java:2287)
 at android.support.v4.view.LayoutInflaterCompatHC$FactoryWrapperHC.onCreateView(LayoutInflaterCompatHC.java:44)
 at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:177)
 at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:729)
 at android.view.LayoutInflater.rInflate(LayoutInflater.java:810) 
 at android.view.LayoutInflater.inflate(LayoutInflater.java:508) 
 at android.view.LayoutInflater.inflate(LayoutInflater.java:418) 
 at com.example.vikrant.safeshelter.Fragments.ChatFragment.onCreateView(ChatFragment.java:57) 
 at android.support.v4.app.Fragment.performCreateView(Fragment.java:1974) 
 at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1067) 
 at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1252) 
 at android.support.v4.app.BackStackRecord.run(BackStackRecord.java:738) 
 at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1617) 
 at android.support.v4.app.FragmentManagerImpl.executePendingTransactions(FragmentManager.java:570) 
 at android.support.v4.app.FragmentStatePagerAdapter.finishUpdate(FragmentStatePagerAdapter.java:164) 
 at android.support.v4.view.ViewPager.populate(ViewPager.java:1177) 
 at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:608) 
 at android.support.v4.view.ViewPager.setCurrentItemInternal(ViewPager.java:570) 
 at android.support.v4.view.ViewPager.setCurrentItem(ViewPager.java:551) 
 at android.support.design.widget.TabLayout$ViewPagerOnTabSelectedListener.onTabSelected(TabLayout.java:1627) 
 at android.support.design.widget.TabLayout.selectTab(TabLayout.java:837) 
 at android.support.design.widget.TabLayout.selectTab(TabLayout.java:809) 
 at android.support.design.widget.TabLayout$Tab.select(TabLayout.java:1077) 
 at android.support.design.widget.TabLayout$1.onClick(TabLayout.java:643) 
 at android.view.View.performClick(View.java:4759) 
 at android.view.View$PerformClick.run(View.java:19770) 
 at android.os.Handler.handleCallback(Handler.java:739) 
 at android.os.Handler.dispatchMessage(Handler.java:95) 
 at android.os.Looper.loop(Looper.java:135) 
 at android.app.ActivityThread.main(ActivityThread.java:5234) 
 at java.lang.reflect.Method.invoke(Native Method) 
 at java.lang.reflect.Method.invoke(Method.java:372) 
 at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) 
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 

0 个答案:

没有答案