Android   发布时间:2022-04-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了java – 除非您更新Google Play服务,否则此应用无法运行大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

我一直在努力让Android V2的谷歌地图工作.
我在设备上尝试这个:三星Galaxy S [2.3.3]和仿真器.

我的清单:
(我尝试过使用Debug键和Release键)

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

    <uses-sdk
        android:minSdkVersion="10"
        android:targetSdkVersion="18" />

    <permission 
        android:name="com.example.klottr.permission.MAPS_RECEIVE" 
        android:protectionLevel="signature"></permission>
    <uses-permission 
        android:name="com.example.klottr.permission.MAPS_RECEIVE"/>
    <uses-permission 
        android:name="com.google.android.providers.gsf.permission.READ_GserviCES"/>
    <uses-permission 
        android:name="android.permission.INTERNET"/>
    <uses-permission 
        android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission 
        android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission 
        android:name="android.permission.ACCESS_FINE_LOCATION"/>

    <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="AIzaSyDqmCXjO-h-Yy_qGsyVrUz_icB9mCTUzLM"/>
        <activity
            android:name="com.example.klottr.MainActivity"
            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>

主要活动xml:

        <RelativeLayout xmlns:android="http://scheR_773_11845@as.android.com/apk/res/android"
         xmlns:tools="http://scheR_773_11845@as.android.com/tools"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
          tools:context=".MainActivity" >

         <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_centerVertical="true"
        android:text="@String/Hello_world" />
    <fragment
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.gms.maps.SupportMapFragment"/>

</RelativeLayout>
@H_797_0@mainactivity java文件

package com.example.klottr;

import com.example.klottr.R;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;

import android.os.bundle;
import android.app.Activity;
import android.view.Menu;

import android.os.bundle;
import android.support.v4.app.FragmentActivity;

public class MainActivity extends FragmentActivity {
    GoogleMap googleMap;
 @Override
 protected void onCreate(Bundle savedInstanceStatE) {
  super.onCreate(savedInstanceStatE);

  setContentView(R.layout.activity_main);
 }

}

我已经尝试按照谷歌网站上的指南,以及stackoverflow的一些指南和技巧.我不仅仅是欣赏一些提示.
我只是想让我的设备正好显示地图,但我得到了
“除非您更新Google Play服务,否则此应用无法运行”,即使我的设备上安装了最新版本的Google Play服务.

@L_618_6@:

Google更新了google_play_service库,但没有更新Google Play中的Play服务应用.
因此,我建议您在Android SDK Manager中下载“Froyo的Google Play服务”,并将其插入项目而不是当前项目.

大佬总结

以上是大佬教程为你收集整理的java – 除非您更新Google Play服务,否则此应用无法运行全部内容,希望文章能够帮你解决java – 除非您更新Google Play服务,否则此应用无法运行所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。
标签: