I encountered this error when deploying an Android app that was built for an older version (4.2.x) of Mono for Android.
Detecting installed packages Waiting for packaging to complete Installing application on device Deployment failed because of an internal error: Unexpected install output: pkg: /data/local/tmp/ca.guelph.visit-Signed.apk Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED] Deployment failed. Internal error.
The cause of the problem was these lines in the AndroidManifest.xml:
<!-- Allow the application to access Google web-based services. --> <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" /> <!-- Notice here that we have the package name of our application as a prefix on the permissions. --> <uses-permission android:name="Visit.Guelph.permission.MAPS_RECEIVE" /> <permission android:name="Visit.Guelph.permission.MAPS_RECEIVE" android:protectionLevel="signature" />