Forum Xamarin.Android

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

I am using Xamarin VS 2017 and Firebase Messaging in my app and I have a problem compiling for Api23

DonPalabrasDonPalabras Member ✭✭
edited August 2018 in Xamarin.Android

Hi everyone.

I am using Xamarin VS 2017 and Firebase Messaging in my app and I have a problem compiling for Marshmallow 6.0 and versions below, I get the following error:

Error ADB0010: Unexpected install output:   pkg: /data/local/tmp/MyApp.MyApp-Signed.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

   en Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
   en Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
   en System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
   en System.Threading.Tasks.Task.Execute()         0   

However this is my AndroidManifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="//schemas.android.com/apk/res/android" 
            android:versionCode="1" 
            android:versionName="1.0" 
            package="MyApp.MyApp" 
            android:installLocation="auto">
    <uses-sdk android:minSdkVersion="21" android:targetSdkVersion="27" />
    <application android:allowBackup="true" 
                android:icon="@drawable/IconApp" 
                android:label="MyApp" 
                android:roundIcon="@drawable/Icon" 
                android:supportsRtl="true" 
                android:theme="@style/AppTheme">
        <receiver 
                android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver" 
                android:exported="false" />
        <receiver 
                android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver" 
                android:exported="true" 
                android:permission="com.google.android.c2dm.permission.SEND">
            <intent-filter>
                <action android:name="com.google.android.c2dm.intent.RECEIVE" />
                <action android:name="com.google.android.c2dm.intent.REGISTRATION" />
                <category android:name="${applicationId}" />
            </intent-filter>
        </receiver>
    </application>
</manifest>

...
It is worth mentioning that I review this Xamarin Firebase Messaging project:

//github.com/eddydn/XamarinFirebaseMessaging

**I implemented it, and it works! Then I relied on this project and just replaced the Json file of my Firebase application and I replaced the names of the app in manifests, as well as the id key, etc. and... oh disappointment, gives me the same problem again ...
**

Error ADB0010: Unexpected install output:   pkg: /data/local/tmp/MyApp.MyApp-Signed.apk
Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

   en Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
   en Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
   en System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
   en System.Threading.Tasks.Task.Execute()         0   

What am I doing wrong?

The problem is that a month ago, the app worked in the entire range of API levels, from 21 to 27.

will be a problem with my Json, with Firebase, VS, Xamarin or what?

Please help or guidance!

Thanks a lot.

What am I doing wrong?

The problem is that a month ago, the app worked in the entire range of API levels, from 21 to 27.

will be a problem with my Json, with Firebase, VS, Xamarin or what?

Please help or guidance!

Thanks a lot.

Sign In or Register to comment.