Deployment error when Targeting to Android 12
See original GitHub issue🐛 Bug Report
Deployment error when Targeting to Android 12.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: Mono.AndroidTools.InstallFailedException: Unexpected install output: Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl2068875903.tmp/base.apk (at Binary XML file line #73): crc6494e14b9856016c30.PNFirebaseMessagingService: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Mono.AndroidTools.Internal.AdbOutputParsing.CheckInstallSuccess (System.String output, System.String packageName) [0x0018a] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/Internal/AdbOutputParsing.cs:350
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Mono.AndroidTools.AndroidDevice+<>c__DisplayClass100_0.<InstallPackage>b__0 (System.Threading.Tasks.Task1[TResult] t) [0x00016] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Mono.AndroidTools/AndroidDevice.cs:803 /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at System.Threading.Tasks.ContinuationTaskFromResultTask
1[TAntecedentResult].InnerInvoke () [0x00024] in <e068e2227ab74c1bb3d724ebaab0e3ff>:0
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at System.Threading.Tasks.Task.Execute () [0x00000] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/external/corert/src/System.Private.CoreLib/src/System/Threading/Tasks/Task.cs:2319
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: — End of stack trace from previous location where exception was thrown —
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync (Mono.AndroidTools.AndroidDevice device, PushAndInstallCommand command, System.Threading.CancellationToken token) [0x001cf] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Devices/AndroidDeviceExtensions.cs:206
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at AndroidDeviceExtensions.PushAndInstallPackageAsync (Mono.AndroidTools.AndroidDevice device, PushAndInstallCommand command, System.Threading.CancellationToken token) [0x0042f] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/external/androidtools/Xamarin.AndroidTools/Devices/AndroidDeviceExtensions.cs:223
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage (System.Boolean installed) [0x001c0] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/Tasks/FastDeploy.cs:338
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.InstallPackage (System.Boolean installed) [0x0032d] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/Tasks/FastDeploy.cs:355
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.Debugging.targets(604,5): error ADB0010: at Xamarin.Android.Tasks.FastDeploy.RunTaskAsync () [0x002fb] in /Users/builder/azdo/_work/1/s/xamarin-android/external/monodroid/tools/msbuild/Tasks/FastDeploy.cs:212
Expected behavior
Reproduction steps
Configuration
Version: 1.x
Platform:
- 🤖 Android
Main issue identified from the log
crc6494e14b9856016c30.PNFirebaseMessagingService: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present]
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top GitHub Comments
Until the library is updated, you only need to add this to your AndroidManifest.xml under
application
key:Edit: solution found here
Will the bug be fixed in the near future? Should be really simple:
[Service**(Exported = false)**] [IntentFilter(new[] {"com.google.firebase.MESSAGING_EVENT"})] public class PNFirebaseMessagingService: FirebaseMessagingService