gpt4 book ai didi

java - 我已经按照谷歌地图教程进行操作,但继续得到这个答案:Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY

转载 作者:行者123 更新时间:2023-12-01 14:19:43 25 4
gpt4 key购买 nike

我一直在关注有关谷歌地图的教程,这是一个非常基本的教程http://umut.tekguc.info/en/content/google-android-map-v2-step-step ,我无法在模拟器上运行该应用程序,iv 下载并安装了 vend.apk 和 gms.apk 文件,并且还从 SDK 管理器下载了 google play 服务。完成所有这些后,当我最终在模拟器上运行我的应用程序时,出现以下错误:“安装错误:INSTALL_FAILED_MISSING_SHARED_LIBRARY”。

我也尝试过更改 AVD,但不起作用。我认为我无法使用 AVD 正确配置 API。任何帮助将不胜感激,谢谢大家。这是我的代码:MainActivity.java:

package com.example.googlemapsandroidv2;

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

import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.MapFragment;
import com.google.android.gms.maps.model.LatLng;
import com.google.android.gms.maps.model.Marker;
import com.google.android.gms.maps.model.MarkerOptions;

public class MainActivity extends Activity {

private GoogleMap mMap;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
mMap=((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
final LatLng CIU=new LatLng(35.21843892856462, 33.41662287712097);
Marker ciu=mMap.addMarker(new MarkerOptions().position(CIU).title("My Office"));
}

@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, menu);
return true;
}

}

这是 list :

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

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

<permission
android:name="com.example.googlemapsandroidv2.permission.MAPS_RECEIVE"
android:protectionLevel="signature"></permission>


<uses-permission
android:name="com.example.googlemapsandroidv2.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="AIzaSyCLhVm6faqwv8gaj1aWZ_Xvlsf4sMal42U"/>
<uses-library
android:name="com.google.android.maps" />
<activity
android:name="com.example.googlemapsandroidv2.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>

以下是有关 AVD 的详细信息:目标:Android 4.0(API级别14)CPU/ABI:ARM(armeabi-v7a)

这是我在控制台上得到的:

[2013-07-18 14:27:31 - GoogleMapsAndroidV2] Android Launch!
[2013-07-18 14:27:31 - GoogleMapsAndroidV2] adb is running normally.
[2013-07-18 14:27:31 - GoogleMapsAndroidV2] Performing com.example.googlemapsandroidv2.MainActivity activity launch
[2013-07-18 14:27:31 - GoogleMapsAndroidV2] Automatic Target Mode: launching new emulator with compatible AVD 'MapTestAvd'
[2013-07-18 14:27:31 - GoogleMapsAndroidV2] Launching a new emulator with Virtual Device 'MapTestAvd'
[2013-07-18 14:27:33 - GoogleMapsAndroidV2] New emulator found: emulator-5554
[2013-07-18 14:27:33 - GoogleMapsAndroidV2] Waiting for HOME ('android.process.acore') to be launched...
[2013-07-18 14:28:29 - GoogleMapsAndroidV2] HOME is up on device 'emulator-5554'
[2013-07-18 14:28:29 - GoogleMapsAndroidV2] Uploading GoogleMapsAndroidV2.apk onto device 'emulator-5554'
[2013-07-18 14:28:40 - GoogleMapsAndroidV2] Installing GoogleMapsAndroidV2.apk...
[2013-07-18 14:29:26 - GoogleMapsAndroidV2] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2013-07-18 14:29:26 - GoogleMapsAndroidV2] Please check logcat output for more details.
[2013-07-18 14:29:26 - GoogleMapsAndroidV2] Launch canceled!
[2013-07-18 14:34:40 - SDK Manager] Warning: Ignoring add-on 'addon-google_apis-google-14': File not found: manifest.ini
[2013-07-18 14:37:09 - SDK Manager] Warning: Ignoring add-on 'addon-google_apis-google-14': File not found: manifest.ini
[2013-07-18 14:54:40 - SDK Manager] Warning: Ignoring add-on 'addon-google_apis-google-14': File not found: manifest.ini

感谢大家抽出宝贵的时间。我真的很感谢各种帮助。

最佳答案

确保您创建并使用带有“Google API”目标的 AVD。

否则它将找不到 Google map 。

enter image description here

如果您在目标列表中没有看到该选项,请确保您已从 SDK 管理器下载该选项。

enter image description here

关于java - 我已经按照谷歌地图教程进行操作,但继续得到这个答案:Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17720334/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com