question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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.ContinuationTaskFromResultTask1[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:open
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
Veloriencommented, Jan 26, 2022

Until the library is updated, you only need to add this to your AndroidManifest.xml under application key:

<receiver android:name="crc6494e14b9856016c30.PNFirebaseMessagingService" android:exported="false">
	<intent-filter>
		<action android:name="com.google.firebase.MESSAGING_EVENT" />
	</intent-filter>
</receiver>

Edit: solution found here

2reactions
aakybreakycommented, Jan 18, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android Studio error: "Manifest merger failed: Apps ...
I always got the error: Manifest merger failed: Apps targeting Android 12 and higher are required to specify an explicit value for android: ......
Read more >
Behavior changes: Apps targeting Android 12
Learn about changes in Android 12 that will affect apps when they target ... If you attempt to install the app, Logcat displays...
Read more >
Apps targeting Android 12 and higher are required - YouTube
Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for android : exported when the ......
Read more >
Android 12 Manifest - Microsoft Q&A
Hi, I'm trying to deploy my app targeting Android 12 but I continue receive this message Severity Code Description Project File Line ......
Read more >
How I fixed a Flutter app that crashed on Android 12 devices.
Step 2: Solution. This problem can be caused by a number of factors but the most common reason is pending intents on android...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found