java – 除非您更新Google Play服务,否则此应用无法运行
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了java – 除非您更新Google Play服务,否则此应用无法运行,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含3089字,纯文字阅读大概需要5分钟。
内容图文
![java – 除非您更新Google Play服务,否则此应用无法运行](/upload/InfoBanner/zyjiaocheng/744/2100231fdc2c4665b06da5bafb374c21.jpg)
我一直在努力让Android V2的谷歌地图工作.
我在设备上尝试这个:三星Galaxy S [2.3.3]和仿真器.
我的清单:
(我尝试过使用Debug键和Release键)
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.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://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.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>
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服务.
解决方法:
Google更新了google_play_service库,但没有更新Google Play中的Play服务应用.
因此,我建议您在Android SDK Manager中下载“Froyo的Google Play服务”,并将其插入项目而不是当前项目.
内容总结
以上是互联网集市为您收集整理的java – 除非您更新Google Play服务,否则此应用无法运行全部内容,希望文章能够帮你解决java – 除非您更新Google Play服务,否则此应用无法运行所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。