Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/287.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/210.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 找不到Android支持库和媒体路由器.jar文件_C#_Android_Google Maps_Xamarin.android_Android Support Library - Fatal编程技术网

C# 找不到Android支持库和媒体路由器.jar文件

C# 找不到Android支持库和媒体路由器.jar文件,c#,android,google-maps,xamarin.android,android-support-library,C#,Android,Google Maps,Xamarin.android,Android Support Library,我对Xamarin完全陌生。我想将地图添加到Xamarin.Android中的默认hello world。我已经从导游那里一步一步地准备好了我的舱单。还通过sdk管理器下载了支持库,但要求我安装SL和SL媒体路由器时出错 <!-- We need to be able to download map tiles and access Google Play Services--> <uses-permission android:name="android.permission

我对Xamarin完全陌生。我想将地图添加到Xamarin.Android中的默认hello world。我已经从导游那里一步一步地准备好了我的舱单。还通过sdk管理器下载了支持库,但要求我安装SL和SL媒体路由器时出错

<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="com.MyAppName.MyAppName.permission.MAPS_RECEIVE" />
<permission android:name="com.MyAppName.permission.MAPS_RECEIVE" android:protectionLevel="signature" />

<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


<application android:label="@string/app_name">

    <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCV3Xs4ah1VkL8dI2JWmP2UiTlH4HZuQfQ" />
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
这是舱单:

<?xml version="1.0" encoding="utf-8"?>
<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="com.MyAppName.MyAppName.permission.MAPS_RECEIVE" />
<permission android:name="com.MyAppName.permission.MAPS_RECEIVE" android:protectionLevel="signature" />

<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


<application android:label="@string/app_name">

    <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCV3Xs4ah1VkL8dI2JWmP2UiTlH4HZuQfQ" />
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
我还下载了url中提到的.zip文件,但是 没有像
/users/apple/.local
这样的文件夹。。。把它抄进去

<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="com.MyAppName.MyAppName.permission.MAPS_RECEIVE" />
<permission android:name="com.MyAppName.permission.MAPS_RECEIVE" android:protectionLevel="signature" />

<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


<application android:label="@string/app_name">

    <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCV3Xs4ah1VkL8dI2JWmP2UiTlH4HZuQfQ" />
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
向应用程序添加地图权限真的很棘手吗?还是我做错了什么?

我建议您阅读。Xamarin提供了如何添加和设置地图片段的指南

<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="com.MyAppName.MyAppName.permission.MAPS_RECEIVE" />
<permission android:name="com.MyAppName.permission.MAPS_RECEIVE" android:protectionLevel="signature" />

<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


<application android:label="@string/app_name">

    <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCV3Xs4ah1VkL8dI2JWmP2UiTlH4HZuQfQ" />
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
您还需要从Xamarin组件商店安装google play services组件,而不是从Android SDK管理器安装。

看看下面的答案:
<!-- We need to be able to download map tiles and access Google Play Services-->
<uses-permission android:name="android.permission.INTERNET" />

<!-- Allow the application to access Google web-based services. -->
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />

<!-- Google Maps for Android v2 will cache map tiles on external storage -->
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<!-- Google Maps for Android v2 needs this permission so that it may check the connection state as it must download data -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<!-- Permission to receive remote notifications from Google Play Services -->
<!-- Notice here that we have the package name of our application as a prefix on the permissions. -->
<uses-permission android:name="com.MyAppName.MyAppName.permission.MAPS_RECEIVE" />
<permission android:name="com.MyAppName.permission.MAPS_RECEIVE" android:protectionLevel="signature" />

<!-- These are optional, but recommended. They will allow Maps to use the My Location provider. -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />


<application android:label="@string/app_name">

    <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyCV3Xs4ah1VkL8dI2JWmP2UiTlH4HZuQfQ" />
    <meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>