Question

Recently I tried to add Map Fragment to my Monodroid app written with Xamarin + MvvmCross. When I modify manifest in accordance with one of the mapping guides Google Maps in Monodroid Apps to:

 <?xml version="1.0" encoding="utf-8"?>
    <manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="auto" android:versionName="1.3.0.0" android:versionCode="1" package="MonoDroid.drdApp">
      <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="15" />
      <uses-feature android:glEsVersion="0x00020000" android:required="true" />
      <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
      <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
      <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
      <uses-permission android:name="android.permission.INTERNET" />
      <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
      <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
      <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
      <uses-permission android:name="MonoDroid.drdApp.permission.MAPS_RECEIVE" />
      <permission android:name="MonoDroid.drdApp.permission.MAPS_RECEIVE" android:protectionLevel="signature" />
      <application android:label="Droid App" android:icon="@drawable/icon">
        <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="my_valid_key_goes_here" />
      </application>
</manifest>

I got the following error (runtime error):

Deployment failed because of an internal error: Unexpected install output:  pkg: /data/local/tmp/MonoDroid.drdApp-Signed.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

I discovered that the manifest line which generates the error is:

<permission android:name="MonoDroid.drdApp.permission.MAPS_RECEIVE" android:protectionLevel="signature" />

but this line is mentioned in almost every guide I found related to google maps for Android.

I'm not sure what this line does and not sure if app will work without it (currently it doesn't and this line is one of the suspects.

Could someone clarify how to deal with that manifest line?

Was it helpful?

Solution

I'm not 100% certain, but I suspect that the problem is in using a capital letter in your package name.

Try monodroid.drdapp instead - this may clear the error.

(Or better still - use the company name as part of the manifest)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top