Xamarin Android INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
I'm recieving the above error when deploying my Xamarin Android application using Visual Studio in debug mode, the compile process completes fine but I can't deploy.
The app runs fine in Android 8.1.0 but not in any other lower version.
Error:
>Project "Empresa1.SMPay.Target.Droid.csproj" (Install target(s)):
>C:Program Files (x86)Androidandroid-sdkbuild-tools28.0.0-rc1zipalign.exe 4 "E:HenkoTIEmpresa1SMPaysrcmpayappEmpresa1.SMPay.Target.DroidobjDebugandroidbinbr.com.henkoti.empresaum.smpay.apk" "binDebug\br.com.henkoti.empresaum.smpay-Signed.apk"
>C:Program Files (x86)Androidandroid-sdkbuild-tools28.0.0-rc1apksigner.BAT sign --ks "C:UsersrodriAppDataLocalXamarinMono for Androiddebug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 18 --max-sdk-version 27 binDebugbr.com.henkoti.empresaum.smpay-Signed.apk
>Unexpected install output: pkg: /data/local/tmp/br.com.henkoti.empresaum.smpay-Signed.apk
>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
> at System.Threading.Tasks.Task.Execute()
>Done building project "Empresa1.SMPay.Target.Droid.csproj".
>Build succeeded.
>Unexpected install output: pkg: /data/local/tmp/br.com.henkoti.empresaum.smpay-Signed.apk
>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
> at System.Threading.Tasks.Task.Execute()
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.henkoti.empresaum.smpay" android:installLocation="auto" android:versionName="20181108.0" android:versionCode="4">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BIND_NFC_SERVICE" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
<application android:icon="@drawable/ic_launcher" android:theme="@style/MainTheme" android:label="SIGO" android:allowBackup="true" android:fullBackupContent="@xml/my_backup_rules">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
</application>
</manifest>
Compiled AndroidManifest - Obj Folder
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.henkoti.empresaum.smpay" android:installLocation="auto" android:versionName="20181108.0" android:versionCode="4">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BIND_NFC_SERVICE" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
<application android:icon="@drawable/ic_launcher" android:theme="@style/MainTheme" android:label="SIGO" android:allowBackup="true" android:fullBackupContent="@xml/my_backup_rules" android:name="md5eaa617bc1882abd453813d82db97fb16.MainApplication" android:debuggable="true">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="br.com.henkoti.empresaum.smpay.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
<service android:enabled="true" android:exported="true" android:name="Empresa1.SMPay.HCECardService" android:permission="android.permission.BIND_NFC_SERVICE">
<meta-data android:name="android.nfc.cardemulation.host_apdu_service" android:resource="@xml/aid_list" />
<intent-filter>
<action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<activity android:configChanges="orientation|screenSize" android:launchMode="standard" android:screenOrientation="portrait" android:theme="@style/MainTheme" android:name="md5eaa617bc1882abd453813d82db97fb16.MainActivity" />
<activity android:icon="@drawable/ic_launcher" android:label="SIGO" android:noHistory="true" android:screenOrientation="portrait" android:theme="@style/SplashTheme" android:name="md5eaa617bc1882abd453813d82db97fb16.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:enabled="true" android:label="Connectivity Plugin Broadcast Receiver" android:name="md592d74be4bac08a7af63848ae15d2f86e.ConnectivityChangeBroadcastReceiver" />
<activity android:configChanges="orientation|screenSize" android:name="md5cf4be63b82b35b5ba951617c70f88a94.FilePickerActivity" />
<activity android:configChanges="orientation|screenSize" android:name="md591f613f6733d8b6e91e929a922515c0e.MediaPickerActivity" />
<receiver android:enabled="true" android:exported="false" android:name="md5b60ffeb829f638581ab2bb9b1a7f4f3f.PowerSaveModeBroadcastReceiver" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="br.com.henkoti.empresaum.smpay.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.br.com.henkoti.empresaum.smpay" />
</intent-filter>
</receiver>
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@style/com_facebook_activity_theme" />
<activity android:name="com.facebook.CustomTabMainActivity" />
<!--
The initialization ContentProvider will call FacebookSdk.sdkInitialize automatically
with the application context. This config is merged in with the host app's manifest,
but there can only be one provider with the same authority activated at any given
point; so if the end user has two or more different apps that use Facebook SDK, only the
first one will be able to use the provider. To work around this problem, we use the
following placeholder in the authority to identify each host application as if it was
a completely different provider.
-->
<provider android:name="com.facebook.internal.FacebookInitProvider" android:authorities="br.com.henkoti.empresaum.smpay.FacebookInitProvider" android:exported="false" />
<activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:excludeFromRecents="true" android:exported="false" />
<!--Service handling Google Sign-In user revocation. For apps that do not integrate with
Google Sign-In, this service will never be started.-->
<service android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:exported="true" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
</manifest>
SplashActivity
using Android.OS;
using Android.App;
using Android.Content.PM;
namespace Empresa1.SMPay.Target.Droid
{
[Activity(Label = "SIGO",
Icon = "@drawable/ic_launcher",
Theme = "@style/SplashTheme",
MainLauncher = true,
NoHistory = true,
ScreenOrientation = ScreenOrientation.Portrait)]
public class SplashActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
this.StartActivity(typeof(MainActivity));
}
}
}
MainActivity
using System.Net;
using Android.App;
using Android.OS;
using Android.Content;
using Android.Content.PM;
using Xamarin.Forms;
using Xamarin.Facebook;
using Plugin.Toasts;
using Plugin.Permissions;
using Acr.UserDialogs;
using Autofac;
using Empresa1.SMPay.Application;
using Empresa1.SMPay.Application.IoC;
using Empresa1.SMPay.Target.Droid.Services;
using Empresa1.SMPay.Infra.Platform.Services;
using Android.Gms.Auth.Api;
using InteractiveAlert;
using Xfx;
using FFImageLoading.Forms.Droid;
namespace Empresa1.SMPay.Target.Droid
{
[Activity(Theme = "@style/MainTheme",
LaunchMode = LaunchMode.Multiple,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
ScreenOrientation = ScreenOrientation.Portrait)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
// Facebook
FacebookSdk.SdkInitialize(this.ApplicationContext);
global::Xamarin.Forms.Forms.Init(this, bundle);
// Calendar
XamForms.Controls.Droid.Calendar.Init();
// SSL
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
// Permissions
Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);
// Toast
DependencyService.Register<ToastNotification>();
ToastNotification.Init(this);
// Dialogs
UserDialogs.Init(() => (Activity)Forms.Context);
InteractiveAlerts.Init(() => this);
// XfxControls
XfxControls.Init();
// FFImageLoading
CachedImageRenderer.Init(true);
LoadApplication(new Empresa1.SMPay.Application.App(new Setup(this.ApplicationContext, this, TelephonyService)));
}
protected override void OnStart()
{
base.OnStart();
}
protected override void OnResume()
{
base.OnResume();
}
protected override void OnPause()
{
base.OnPause();
}
protected override void OnStop()
{
base.OnStop();
}
public override void OnRequestPermissionsResult(int requestCode, string permissions, Permission grantResults)
{
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
//base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
if (App.FacebookSinging)
{
// facebook auth
var facebookService = IoCContainer.Container.Resolve<IFacebookService>();
if (facebookService != null)
{
(facebookService as DroidFacebookService)._callbackManager.OnActivityResult(requestCode, (int)resultCode, data);
}
}
else if (App.GoogleSinging)
{
// google auth
if (requestCode == 1)
{
var result = Auth.GoogleSignInApi.GetSignInResultFromIntent(data);
DroidGoogleService.Instance.OnAuthCompleted(result); // TODO
}
}
}
}
}
Anyone here knows, what do i need to do?
I took some screenshots to add here:
android xamarin xamarin.android android-manifest
|
show 1 more comment
I'm recieving the above error when deploying my Xamarin Android application using Visual Studio in debug mode, the compile process completes fine but I can't deploy.
The app runs fine in Android 8.1.0 but not in any other lower version.
Error:
>Project "Empresa1.SMPay.Target.Droid.csproj" (Install target(s)):
>C:Program Files (x86)Androidandroid-sdkbuild-tools28.0.0-rc1zipalign.exe 4 "E:HenkoTIEmpresa1SMPaysrcmpayappEmpresa1.SMPay.Target.DroidobjDebugandroidbinbr.com.henkoti.empresaum.smpay.apk" "binDebug\br.com.henkoti.empresaum.smpay-Signed.apk"
>C:Program Files (x86)Androidandroid-sdkbuild-tools28.0.0-rc1apksigner.BAT sign --ks "C:UsersrodriAppDataLocalXamarinMono for Androiddebug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 18 --max-sdk-version 27 binDebugbr.com.henkoti.empresaum.smpay-Signed.apk
>Unexpected install output: pkg: /data/local/tmp/br.com.henkoti.empresaum.smpay-Signed.apk
>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
> at System.Threading.Tasks.Task.Execute()
>Done building project "Empresa1.SMPay.Target.Droid.csproj".
>Build succeeded.
>Unexpected install output: pkg: /data/local/tmp/br.com.henkoti.empresaum.smpay-Signed.apk
>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
> at System.Threading.Tasks.Task.Execute()
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.henkoti.empresaum.smpay" android:installLocation="auto" android:versionName="20181108.0" android:versionCode="4">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BIND_NFC_SERVICE" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
<application android:icon="@drawable/ic_launcher" android:theme="@style/MainTheme" android:label="SIGO" android:allowBackup="true" android:fullBackupContent="@xml/my_backup_rules">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
</application>
</manifest>
Compiled AndroidManifest - Obj Folder
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.henkoti.empresaum.smpay" android:installLocation="auto" android:versionName="20181108.0" android:versionCode="4">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BIND_NFC_SERVICE" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
<application android:icon="@drawable/ic_launcher" android:theme="@style/MainTheme" android:label="SIGO" android:allowBackup="true" android:fullBackupContent="@xml/my_backup_rules" android:name="md5eaa617bc1882abd453813d82db97fb16.MainApplication" android:debuggable="true">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="br.com.henkoti.empresaum.smpay.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
<service android:enabled="true" android:exported="true" android:name="Empresa1.SMPay.HCECardService" android:permission="android.permission.BIND_NFC_SERVICE">
<meta-data android:name="android.nfc.cardemulation.host_apdu_service" android:resource="@xml/aid_list" />
<intent-filter>
<action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<activity android:configChanges="orientation|screenSize" android:launchMode="standard" android:screenOrientation="portrait" android:theme="@style/MainTheme" android:name="md5eaa617bc1882abd453813d82db97fb16.MainActivity" />
<activity android:icon="@drawable/ic_launcher" android:label="SIGO" android:noHistory="true" android:screenOrientation="portrait" android:theme="@style/SplashTheme" android:name="md5eaa617bc1882abd453813d82db97fb16.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:enabled="true" android:label="Connectivity Plugin Broadcast Receiver" android:name="md592d74be4bac08a7af63848ae15d2f86e.ConnectivityChangeBroadcastReceiver" />
<activity android:configChanges="orientation|screenSize" android:name="md5cf4be63b82b35b5ba951617c70f88a94.FilePickerActivity" />
<activity android:configChanges="orientation|screenSize" android:name="md591f613f6733d8b6e91e929a922515c0e.MediaPickerActivity" />
<receiver android:enabled="true" android:exported="false" android:name="md5b60ffeb829f638581ab2bb9b1a7f4f3f.PowerSaveModeBroadcastReceiver" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="br.com.henkoti.empresaum.smpay.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.br.com.henkoti.empresaum.smpay" />
</intent-filter>
</receiver>
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@style/com_facebook_activity_theme" />
<activity android:name="com.facebook.CustomTabMainActivity" />
<!--
The initialization ContentProvider will call FacebookSdk.sdkInitialize automatically
with the application context. This config is merged in with the host app's manifest,
but there can only be one provider with the same authority activated at any given
point; so if the end user has two or more different apps that use Facebook SDK, only the
first one will be able to use the provider. To work around this problem, we use the
following placeholder in the authority to identify each host application as if it was
a completely different provider.
-->
<provider android:name="com.facebook.internal.FacebookInitProvider" android:authorities="br.com.henkoti.empresaum.smpay.FacebookInitProvider" android:exported="false" />
<activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:excludeFromRecents="true" android:exported="false" />
<!--Service handling Google Sign-In user revocation. For apps that do not integrate with
Google Sign-In, this service will never be started.-->
<service android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:exported="true" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
</manifest>
SplashActivity
using Android.OS;
using Android.App;
using Android.Content.PM;
namespace Empresa1.SMPay.Target.Droid
{
[Activity(Label = "SIGO",
Icon = "@drawable/ic_launcher",
Theme = "@style/SplashTheme",
MainLauncher = true,
NoHistory = true,
ScreenOrientation = ScreenOrientation.Portrait)]
public class SplashActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
this.StartActivity(typeof(MainActivity));
}
}
}
MainActivity
using System.Net;
using Android.App;
using Android.OS;
using Android.Content;
using Android.Content.PM;
using Xamarin.Forms;
using Xamarin.Facebook;
using Plugin.Toasts;
using Plugin.Permissions;
using Acr.UserDialogs;
using Autofac;
using Empresa1.SMPay.Application;
using Empresa1.SMPay.Application.IoC;
using Empresa1.SMPay.Target.Droid.Services;
using Empresa1.SMPay.Infra.Platform.Services;
using Android.Gms.Auth.Api;
using InteractiveAlert;
using Xfx;
using FFImageLoading.Forms.Droid;
namespace Empresa1.SMPay.Target.Droid
{
[Activity(Theme = "@style/MainTheme",
LaunchMode = LaunchMode.Multiple,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
ScreenOrientation = ScreenOrientation.Portrait)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
// Facebook
FacebookSdk.SdkInitialize(this.ApplicationContext);
global::Xamarin.Forms.Forms.Init(this, bundle);
// Calendar
XamForms.Controls.Droid.Calendar.Init();
// SSL
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
// Permissions
Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);
// Toast
DependencyService.Register<ToastNotification>();
ToastNotification.Init(this);
// Dialogs
UserDialogs.Init(() => (Activity)Forms.Context);
InteractiveAlerts.Init(() => this);
// XfxControls
XfxControls.Init();
// FFImageLoading
CachedImageRenderer.Init(true);
LoadApplication(new Empresa1.SMPay.Application.App(new Setup(this.ApplicationContext, this, TelephonyService)));
}
protected override void OnStart()
{
base.OnStart();
}
protected override void OnResume()
{
base.OnResume();
}
protected override void OnPause()
{
base.OnPause();
}
protected override void OnStop()
{
base.OnStop();
}
public override void OnRequestPermissionsResult(int requestCode, string permissions, Permission grantResults)
{
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
//base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
if (App.FacebookSinging)
{
// facebook auth
var facebookService = IoCContainer.Container.Resolve<IFacebookService>();
if (facebookService != null)
{
(facebookService as DroidFacebookService)._callbackManager.OnActivityResult(requestCode, (int)resultCode, data);
}
}
else if (App.GoogleSinging)
{
// google auth
if (requestCode == 1)
{
var result = Auth.GoogleSignInApi.GetSignInResultFromIntent(data);
DroidGoogleService.Instance.OnAuthCompleted(result); // TODO
}
}
}
}
}
Anyone here knows, what do i need to do?
I took some screenshots to add here:
android xamarin xamarin.android android-manifest
You should look in the obj folder for the generated AndroidManifest instead. As the one in properties is not the full.
– Cheesebaron
Nov 13 '18 at 16:02
Thanks, I added the compiled AndroidManifest in the question text.
– Luis Rodrigues
Nov 13 '18 at 16:58
Could it be theandroid.hardware.nfc.hce
requirement? Can you try to set it to required false?
– Cheesebaron
Nov 13 '18 at 18:33
@Cheesebaron din't work, same problem =[
– Luis Rodrigues
Nov 13 '18 at 19:47
logcat from the device will probably reveal more
– Cheesebaron
Nov 13 '18 at 20:40
|
show 1 more comment
I'm recieving the above error when deploying my Xamarin Android application using Visual Studio in debug mode, the compile process completes fine but I can't deploy.
The app runs fine in Android 8.1.0 but not in any other lower version.
Error:
>Project "Empresa1.SMPay.Target.Droid.csproj" (Install target(s)):
>C:Program Files (x86)Androidandroid-sdkbuild-tools28.0.0-rc1zipalign.exe 4 "E:HenkoTIEmpresa1SMPaysrcmpayappEmpresa1.SMPay.Target.DroidobjDebugandroidbinbr.com.henkoti.empresaum.smpay.apk" "binDebug\br.com.henkoti.empresaum.smpay-Signed.apk"
>C:Program Files (x86)Androidandroid-sdkbuild-tools28.0.0-rc1apksigner.BAT sign --ks "C:UsersrodriAppDataLocalXamarinMono for Androiddebug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 18 --max-sdk-version 27 binDebugbr.com.henkoti.empresaum.smpay-Signed.apk
>Unexpected install output: pkg: /data/local/tmp/br.com.henkoti.empresaum.smpay-Signed.apk
>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
> at System.Threading.Tasks.Task.Execute()
>Done building project "Empresa1.SMPay.Target.Droid.csproj".
>Build succeeded.
>Unexpected install output: pkg: /data/local/tmp/br.com.henkoti.empresaum.smpay-Signed.apk
>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
> at System.Threading.Tasks.Task.Execute()
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.henkoti.empresaum.smpay" android:installLocation="auto" android:versionName="20181108.0" android:versionCode="4">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BIND_NFC_SERVICE" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
<application android:icon="@drawable/ic_launcher" android:theme="@style/MainTheme" android:label="SIGO" android:allowBackup="true" android:fullBackupContent="@xml/my_backup_rules">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
</application>
</manifest>
Compiled AndroidManifest - Obj Folder
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.henkoti.empresaum.smpay" android:installLocation="auto" android:versionName="20181108.0" android:versionCode="4">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BIND_NFC_SERVICE" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
<application android:icon="@drawable/ic_launcher" android:theme="@style/MainTheme" android:label="SIGO" android:allowBackup="true" android:fullBackupContent="@xml/my_backup_rules" android:name="md5eaa617bc1882abd453813d82db97fb16.MainApplication" android:debuggable="true">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="br.com.henkoti.empresaum.smpay.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
<service android:enabled="true" android:exported="true" android:name="Empresa1.SMPay.HCECardService" android:permission="android.permission.BIND_NFC_SERVICE">
<meta-data android:name="android.nfc.cardemulation.host_apdu_service" android:resource="@xml/aid_list" />
<intent-filter>
<action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<activity android:configChanges="orientation|screenSize" android:launchMode="standard" android:screenOrientation="portrait" android:theme="@style/MainTheme" android:name="md5eaa617bc1882abd453813d82db97fb16.MainActivity" />
<activity android:icon="@drawable/ic_launcher" android:label="SIGO" android:noHistory="true" android:screenOrientation="portrait" android:theme="@style/SplashTheme" android:name="md5eaa617bc1882abd453813d82db97fb16.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:enabled="true" android:label="Connectivity Plugin Broadcast Receiver" android:name="md592d74be4bac08a7af63848ae15d2f86e.ConnectivityChangeBroadcastReceiver" />
<activity android:configChanges="orientation|screenSize" android:name="md5cf4be63b82b35b5ba951617c70f88a94.FilePickerActivity" />
<activity android:configChanges="orientation|screenSize" android:name="md591f613f6733d8b6e91e929a922515c0e.MediaPickerActivity" />
<receiver android:enabled="true" android:exported="false" android:name="md5b60ffeb829f638581ab2bb9b1a7f4f3f.PowerSaveModeBroadcastReceiver" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="br.com.henkoti.empresaum.smpay.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.br.com.henkoti.empresaum.smpay" />
</intent-filter>
</receiver>
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@style/com_facebook_activity_theme" />
<activity android:name="com.facebook.CustomTabMainActivity" />
<!--
The initialization ContentProvider will call FacebookSdk.sdkInitialize automatically
with the application context. This config is merged in with the host app's manifest,
but there can only be one provider with the same authority activated at any given
point; so if the end user has two or more different apps that use Facebook SDK, only the
first one will be able to use the provider. To work around this problem, we use the
following placeholder in the authority to identify each host application as if it was
a completely different provider.
-->
<provider android:name="com.facebook.internal.FacebookInitProvider" android:authorities="br.com.henkoti.empresaum.smpay.FacebookInitProvider" android:exported="false" />
<activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:excludeFromRecents="true" android:exported="false" />
<!--Service handling Google Sign-In user revocation. For apps that do not integrate with
Google Sign-In, this service will never be started.-->
<service android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:exported="true" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
</manifest>
SplashActivity
using Android.OS;
using Android.App;
using Android.Content.PM;
namespace Empresa1.SMPay.Target.Droid
{
[Activity(Label = "SIGO",
Icon = "@drawable/ic_launcher",
Theme = "@style/SplashTheme",
MainLauncher = true,
NoHistory = true,
ScreenOrientation = ScreenOrientation.Portrait)]
public class SplashActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
this.StartActivity(typeof(MainActivity));
}
}
}
MainActivity
using System.Net;
using Android.App;
using Android.OS;
using Android.Content;
using Android.Content.PM;
using Xamarin.Forms;
using Xamarin.Facebook;
using Plugin.Toasts;
using Plugin.Permissions;
using Acr.UserDialogs;
using Autofac;
using Empresa1.SMPay.Application;
using Empresa1.SMPay.Application.IoC;
using Empresa1.SMPay.Target.Droid.Services;
using Empresa1.SMPay.Infra.Platform.Services;
using Android.Gms.Auth.Api;
using InteractiveAlert;
using Xfx;
using FFImageLoading.Forms.Droid;
namespace Empresa1.SMPay.Target.Droid
{
[Activity(Theme = "@style/MainTheme",
LaunchMode = LaunchMode.Multiple,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
ScreenOrientation = ScreenOrientation.Portrait)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
// Facebook
FacebookSdk.SdkInitialize(this.ApplicationContext);
global::Xamarin.Forms.Forms.Init(this, bundle);
// Calendar
XamForms.Controls.Droid.Calendar.Init();
// SSL
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
// Permissions
Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);
// Toast
DependencyService.Register<ToastNotification>();
ToastNotification.Init(this);
// Dialogs
UserDialogs.Init(() => (Activity)Forms.Context);
InteractiveAlerts.Init(() => this);
// XfxControls
XfxControls.Init();
// FFImageLoading
CachedImageRenderer.Init(true);
LoadApplication(new Empresa1.SMPay.Application.App(new Setup(this.ApplicationContext, this, TelephonyService)));
}
protected override void OnStart()
{
base.OnStart();
}
protected override void OnResume()
{
base.OnResume();
}
protected override void OnPause()
{
base.OnPause();
}
protected override void OnStop()
{
base.OnStop();
}
public override void OnRequestPermissionsResult(int requestCode, string permissions, Permission grantResults)
{
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
//base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
if (App.FacebookSinging)
{
// facebook auth
var facebookService = IoCContainer.Container.Resolve<IFacebookService>();
if (facebookService != null)
{
(facebookService as DroidFacebookService)._callbackManager.OnActivityResult(requestCode, (int)resultCode, data);
}
}
else if (App.GoogleSinging)
{
// google auth
if (requestCode == 1)
{
var result = Auth.GoogleSignInApi.GetSignInResultFromIntent(data);
DroidGoogleService.Instance.OnAuthCompleted(result); // TODO
}
}
}
}
}
Anyone here knows, what do i need to do?
I took some screenshots to add here:
android xamarin xamarin.android android-manifest
I'm recieving the above error when deploying my Xamarin Android application using Visual Studio in debug mode, the compile process completes fine but I can't deploy.
The app runs fine in Android 8.1.0 but not in any other lower version.
Error:
>Project "Empresa1.SMPay.Target.Droid.csproj" (Install target(s)):
>C:Program Files (x86)Androidandroid-sdkbuild-tools28.0.0-rc1zipalign.exe 4 "E:HenkoTIEmpresa1SMPaysrcmpayappEmpresa1.SMPay.Target.DroidobjDebugandroidbinbr.com.henkoti.empresaum.smpay.apk" "binDebug\br.com.henkoti.empresaum.smpay-Signed.apk"
>C:Program Files (x86)Androidandroid-sdkbuild-tools28.0.0-rc1apksigner.BAT sign --ks "C:UsersrodriAppDataLocalXamarinMono for Androiddebug.keystore" --ks-pass pass:android --ks-key-alias androiddebugkey --key-pass pass:android --min-sdk-version 18 --max-sdk-version 27 binDebugbr.com.henkoti.empresaum.smpay-Signed.apk
>Unexpected install output: pkg: /data/local/tmp/br.com.henkoti.empresaum.smpay-Signed.apk
>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
> at System.Threading.Tasks.Task.Execute()
>Done building project "Empresa1.SMPay.Target.Droid.csproj".
>Build succeeded.
>Unexpected install output: pkg: /data/local/tmp/br.com.henkoti.empresaum.smpay-Signed.apk
>Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]
>
> at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess(String output, String packageName)
> at Mono.AndroidTools.AndroidDevice.<>c__DisplayClass94_0.<InstallPackage>b__0(Task`1 t)
> at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke()
> at System.Threading.Tasks.Task.Execute()
AndroidManifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.henkoti.empresaum.smpay" android:installLocation="auto" android:versionName="20181108.0" android:versionCode="4">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BIND_NFC_SERVICE" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
<application android:icon="@drawable/ic_launcher" android:theme="@style/MainTheme" android:label="SIGO" android:allowBackup="true" android:fullBackupContent="@xml/my_backup_rules">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="${applicationId}.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
</application>
</manifest>
Compiled AndroidManifest - Obj Folder
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="br.com.henkoti.empresaum.smpay" android:installLocation="auto" android:versionName="20181108.0" android:versionCode="4">
<uses-sdk android:minSdkVersion="18" android:targetSdkVersion="27" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.NFC" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.BIND_NFC_SERVICE" />
<uses-feature android:name="android.hardware.nfc.hce" android:required="true" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.camera.autofocus" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" />
<uses-feature android:name="android.hardware.location.network" />
<application android:icon="@drawable/ic_launcher" android:theme="@style/MainTheme" android:label="SIGO" android:allowBackup="true" android:fullBackupContent="@xml/my_backup_rules" android:name="md5eaa617bc1882abd453813d82db97fb16.MainApplication" android:debuggable="true">
<provider android:name="android.support.v4.content.FileProvider" android:authorities="br.com.henkoti.empresaum.smpay.fileprovider" android:exported="false" android:grantUriPermissions="true">
<meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_paths" />
</provider>
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id" />
<service android:enabled="true" android:exported="true" android:name="Empresa1.SMPay.HCECardService" android:permission="android.permission.BIND_NFC_SERVICE">
<meta-data android:name="android.nfc.cardemulation.host_apdu_service" android:resource="@xml/aid_list" />
<intent-filter>
<action android:name="android.nfc.cardemulation.action.HOST_APDU_SERVICE" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</service>
<activity android:configChanges="orientation|screenSize" android:launchMode="standard" android:screenOrientation="portrait" android:theme="@style/MainTheme" android:name="md5eaa617bc1882abd453813d82db97fb16.MainActivity" />
<activity android:icon="@drawable/ic_launcher" android:label="SIGO" android:noHistory="true" android:screenOrientation="portrait" android:theme="@style/SplashTheme" android:name="md5eaa617bc1882abd453813d82db97fb16.SplashActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<receiver android:enabled="true" android:label="Connectivity Plugin Broadcast Receiver" android:name="md592d74be4bac08a7af63848ae15d2f86e.ConnectivityChangeBroadcastReceiver" />
<activity android:configChanges="orientation|screenSize" android:name="md5cf4be63b82b35b5ba951617c70f88a94.FilePickerActivity" />
<activity android:configChanges="orientation|screenSize" android:name="md591f613f6733d8b6e91e929a922515c0e.MediaPickerActivity" />
<receiver android:enabled="true" android:exported="false" android:name="md5b60ffeb829f638581ab2bb9b1a7f4f3f.PowerSaveModeBroadcastReceiver" />
<provider android:name="mono.MonoRuntimeProvider" android:exported="false" android:initOrder="2147483647" android:authorities="br.com.henkoti.empresaum.smpay.mono.MonoRuntimeProvider.__mono_init__" />
<!--suppress ExportedReceiver-->
<receiver android:name="mono.android.Seppuku">
<intent-filter>
<action android:name="mono.android.intent.action.SEPPUKU" />
<category android:name="mono.android.intent.category.SEPPUKU.br.com.henkoti.empresaum.smpay" />
</intent-filter>
</receiver>
<activity android:name="com.facebook.FacebookActivity" android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme="@style/com_facebook_activity_theme" />
<activity android:name="com.facebook.CustomTabMainActivity" />
<!--
The initialization ContentProvider will call FacebookSdk.sdkInitialize automatically
with the application context. This config is merged in with the host app's manifest,
but there can only be one provider with the same authority activated at any given
point; so if the end user has two or more different apps that use Facebook SDK, only the
first one will be able to use the provider. To work around this problem, we use the
following placeholder in the authority to identify each host application as if it was
a completely different provider.
-->
<provider android:name="com.facebook.internal.FacebookInitProvider" android:authorities="br.com.henkoti.empresaum.smpay.FacebookInitProvider" android:exported="false" />
<activity android:name="com.google.android.gms.auth.api.signin.internal.SignInHubActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:excludeFromRecents="true" android:exported="false" />
<!--Service handling Google Sign-In user revocation. For apps that do not integrate with
Google Sign-In, this service will never be started.-->
<service android:name="com.google.android.gms.auth.api.signin.RevocationBoundService" android:exported="true" android:permission="com.google.android.gms.auth.api.signin.permission.REVOCATION_NOTIFICATION" />
<activity android:name="com.google.android.gms.common.api.GoogleApiActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar" android:exported="false" />
<meta-data android:name="com.google.android.gms.version" android:value="@integer/google_play_services_version" />
</application>
</manifest>
SplashActivity
using Android.OS;
using Android.App;
using Android.Content.PM;
namespace Empresa1.SMPay.Target.Droid
{
[Activity(Label = "SIGO",
Icon = "@drawable/ic_launcher",
Theme = "@style/SplashTheme",
MainLauncher = true,
NoHistory = true,
ScreenOrientation = ScreenOrientation.Portrait)]
public class SplashActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
this.StartActivity(typeof(MainActivity));
}
}
}
MainActivity
using System.Net;
using Android.App;
using Android.OS;
using Android.Content;
using Android.Content.PM;
using Xamarin.Forms;
using Xamarin.Facebook;
using Plugin.Toasts;
using Plugin.Permissions;
using Acr.UserDialogs;
using Autofac;
using Empresa1.SMPay.Application;
using Empresa1.SMPay.Application.IoC;
using Empresa1.SMPay.Target.Droid.Services;
using Empresa1.SMPay.Infra.Platform.Services;
using Android.Gms.Auth.Api;
using InteractiveAlert;
using Xfx;
using FFImageLoading.Forms.Droid;
namespace Empresa1.SMPay.Target.Droid
{
[Activity(Theme = "@style/MainTheme",
LaunchMode = LaunchMode.Multiple,
ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation,
ScreenOrientation = ScreenOrientation.Portrait)]
public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
{
protected override void OnCreate(Bundle bundle)
{
TabLayoutResource = Resource.Layout.Tabbar;
ToolbarResource = Resource.Layout.Toolbar;
base.OnCreate(bundle);
// Facebook
FacebookSdk.SdkInitialize(this.ApplicationContext);
global::Xamarin.Forms.Forms.Init(this, bundle);
// Calendar
XamForms.Controls.Droid.Calendar.Init();
// SSL
ServicePointManager.ServerCertificateValidationCallback += (sender, cert, chain, sslPolicyErrors) => true;
// Permissions
Plugin.CurrentActivity.CrossCurrentActivity.Current.Init(this, bundle);
// Toast
DependencyService.Register<ToastNotification>();
ToastNotification.Init(this);
// Dialogs
UserDialogs.Init(() => (Activity)Forms.Context);
InteractiveAlerts.Init(() => this);
// XfxControls
XfxControls.Init();
// FFImageLoading
CachedImageRenderer.Init(true);
LoadApplication(new Empresa1.SMPay.Application.App(new Setup(this.ApplicationContext, this, TelephonyService)));
}
protected override void OnStart()
{
base.OnStart();
}
protected override void OnResume()
{
base.OnResume();
}
protected override void OnPause()
{
base.OnPause();
}
protected override void OnStop()
{
base.OnStop();
}
public override void OnRequestPermissionsResult(int requestCode, string permissions, Permission grantResults)
{
PermissionsImplementation.Current.OnRequestPermissionsResult(requestCode, permissions, grantResults);
//base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
}
protected override void OnActivityResult(int requestCode, Result resultCode, Intent data)
{
base.OnActivityResult(requestCode, resultCode, data);
if (App.FacebookSinging)
{
// facebook auth
var facebookService = IoCContainer.Container.Resolve<IFacebookService>();
if (facebookService != null)
{
(facebookService as DroidFacebookService)._callbackManager.OnActivityResult(requestCode, (int)resultCode, data);
}
}
else if (App.GoogleSinging)
{
// google auth
if (requestCode == 1)
{
var result = Auth.GoogleSignInApi.GetSignInResultFromIntent(data);
DroidGoogleService.Instance.OnAuthCompleted(result); // TODO
}
}
}
}
}
Anyone here knows, what do i need to do?
I took some screenshots to add here:
android xamarin xamarin.android android-manifest
android xamarin xamarin.android android-manifest
edited Nov 13 '18 at 16:56
Luis Rodrigues
asked Nov 13 '18 at 14:23
Luis RodriguesLuis Rodrigues
377
377
You should look in the obj folder for the generated AndroidManifest instead. As the one in properties is not the full.
– Cheesebaron
Nov 13 '18 at 16:02
Thanks, I added the compiled AndroidManifest in the question text.
– Luis Rodrigues
Nov 13 '18 at 16:58
Could it be theandroid.hardware.nfc.hce
requirement? Can you try to set it to required false?
– Cheesebaron
Nov 13 '18 at 18:33
@Cheesebaron din't work, same problem =[
– Luis Rodrigues
Nov 13 '18 at 19:47
logcat from the device will probably reveal more
– Cheesebaron
Nov 13 '18 at 20:40
|
show 1 more comment
You should look in the obj folder for the generated AndroidManifest instead. As the one in properties is not the full.
– Cheesebaron
Nov 13 '18 at 16:02
Thanks, I added the compiled AndroidManifest in the question text.
– Luis Rodrigues
Nov 13 '18 at 16:58
Could it be theandroid.hardware.nfc.hce
requirement? Can you try to set it to required false?
– Cheesebaron
Nov 13 '18 at 18:33
@Cheesebaron din't work, same problem =[
– Luis Rodrigues
Nov 13 '18 at 19:47
logcat from the device will probably reveal more
– Cheesebaron
Nov 13 '18 at 20:40
You should look in the obj folder for the generated AndroidManifest instead. As the one in properties is not the full.
– Cheesebaron
Nov 13 '18 at 16:02
You should look in the obj folder for the generated AndroidManifest instead. As the one in properties is not the full.
– Cheesebaron
Nov 13 '18 at 16:02
Thanks, I added the compiled AndroidManifest in the question text.
– Luis Rodrigues
Nov 13 '18 at 16:58
Thanks, I added the compiled AndroidManifest in the question text.
– Luis Rodrigues
Nov 13 '18 at 16:58
Could it be the
android.hardware.nfc.hce
requirement? Can you try to set it to required false?– Cheesebaron
Nov 13 '18 at 18:33
Could it be the
android.hardware.nfc.hce
requirement? Can you try to set it to required false?– Cheesebaron
Nov 13 '18 at 18:33
@Cheesebaron din't work, same problem =[
– Luis Rodrigues
Nov 13 '18 at 19:47
@Cheesebaron din't work, same problem =[
– Luis Rodrigues
Nov 13 '18 at 19:47
logcat from the device will probably reveal more
– Cheesebaron
Nov 13 '18 at 20:40
logcat from the device will probably reveal more
– Cheesebaron
Nov 13 '18 at 20:40
|
show 1 more comment
1 Answer
1
active
oldest
votes
Finally I was able to solve the problem, the solution was to change the prefix name of the HCECardService to lowecase.
Before: Empresa1.SMPay.HCECardService
After: empresa1.smpay.HCECardService
[Service(Exported = true, Enabled = true, Permission = "android.permission.BIND_NFC_SERVICE", Name = "empresa1.smpay.HCECardService"), IntentFilter(new { "android.nfc.cardemulation.action.HOST_APDU_SERVICE" }, Categories = new { "android.intent.category.DEFAULT" }),
MetaData("android.nfc.cardemulation.host_apdu_service", Resource = "@xml/aid_list")]
public class HCECardService : HostApduService
{ ... }
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283162%2fxamarin-android-install-parse-failed-manifest-malformed%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Finally I was able to solve the problem, the solution was to change the prefix name of the HCECardService to lowecase.
Before: Empresa1.SMPay.HCECardService
After: empresa1.smpay.HCECardService
[Service(Exported = true, Enabled = true, Permission = "android.permission.BIND_NFC_SERVICE", Name = "empresa1.smpay.HCECardService"), IntentFilter(new { "android.nfc.cardemulation.action.HOST_APDU_SERVICE" }, Categories = new { "android.intent.category.DEFAULT" }),
MetaData("android.nfc.cardemulation.host_apdu_service", Resource = "@xml/aid_list")]
public class HCECardService : HostApduService
{ ... }
add a comment |
Finally I was able to solve the problem, the solution was to change the prefix name of the HCECardService to lowecase.
Before: Empresa1.SMPay.HCECardService
After: empresa1.smpay.HCECardService
[Service(Exported = true, Enabled = true, Permission = "android.permission.BIND_NFC_SERVICE", Name = "empresa1.smpay.HCECardService"), IntentFilter(new { "android.nfc.cardemulation.action.HOST_APDU_SERVICE" }, Categories = new { "android.intent.category.DEFAULT" }),
MetaData("android.nfc.cardemulation.host_apdu_service", Resource = "@xml/aid_list")]
public class HCECardService : HostApduService
{ ... }
add a comment |
Finally I was able to solve the problem, the solution was to change the prefix name of the HCECardService to lowecase.
Before: Empresa1.SMPay.HCECardService
After: empresa1.smpay.HCECardService
[Service(Exported = true, Enabled = true, Permission = "android.permission.BIND_NFC_SERVICE", Name = "empresa1.smpay.HCECardService"), IntentFilter(new { "android.nfc.cardemulation.action.HOST_APDU_SERVICE" }, Categories = new { "android.intent.category.DEFAULT" }),
MetaData("android.nfc.cardemulation.host_apdu_service", Resource = "@xml/aid_list")]
public class HCECardService : HostApduService
{ ... }
Finally I was able to solve the problem, the solution was to change the prefix name of the HCECardService to lowecase.
Before: Empresa1.SMPay.HCECardService
After: empresa1.smpay.HCECardService
[Service(Exported = true, Enabled = true, Permission = "android.permission.BIND_NFC_SERVICE", Name = "empresa1.smpay.HCECardService"), IntentFilter(new { "android.nfc.cardemulation.action.HOST_APDU_SERVICE" }, Categories = new { "android.intent.category.DEFAULT" }),
MetaData("android.nfc.cardemulation.host_apdu_service", Resource = "@xml/aid_list")]
public class HCECardService : HostApduService
{ ... }
answered Nov 13 '18 at 21:10
Luis RodriguesLuis Rodrigues
377
377
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53283162%2fxamarin-android-install-parse-failed-manifest-malformed%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
You should look in the obj folder for the generated AndroidManifest instead. As the one in properties is not the full.
– Cheesebaron
Nov 13 '18 at 16:02
Thanks, I added the compiled AndroidManifest in the question text.
– Luis Rodrigues
Nov 13 '18 at 16:58
Could it be the
android.hardware.nfc.hce
requirement? Can you try to set it to required false?– Cheesebaron
Nov 13 '18 at 18:33
@Cheesebaron din't work, same problem =[
– Luis Rodrigues
Nov 13 '18 at 19:47
logcat from the device will probably reveal more
– Cheesebaron
Nov 13 '18 at 20:40