Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manifest merger failed with multiple errors while compiling the project #225

Open
JesusDMedinaC-Bitso opened this issue Dec 23, 2021 · 3 comments

Comments

@JesusDMedinaC-Bitso
Copy link

I'm facing this issue while compiling the project and trying to run the test.

I didn't do any modification. Just open the project and run.

The log is this:

> Task :app:processDebugAndroidTestManifest FAILED
/Users/jesusdmedinac/software/android/android-compose-codelabs/TestingCodelab/app/build/intermediates/tmp/manifest/androidTest/debug/tempFile1ProcessTestManifest6578991288352733637.xml Error:
	android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/Users/jesusdmedinac/software/android/android-compose-codelabs/TestingCodelab/app/build/intermediates/tmp/manifest/androidTest/debug/tempFile1ProcessTestManifest6578991288352733637.xml Error:
	android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.
/Users/jesusdmedinac/software/android/android-compose-codelabs/TestingCodelab/app/build/intermediates/tmp/manifest/androidTest/debug/tempFile1ProcessTestManifest6578991288352733637.xml Error:
	android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details.

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.


Execution failed for task ':app:processDebugAndroidTestManifest'.
> Manifest merger failed with multiple errors, see logs

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

I'm trying to run the test on the class AnimatingCircleTests on the TestingCodelab app.

Any suggestion about how to solve this issue?

@Corvus400
Copy link

I'm having the exact same problem.

@Corvus400
Copy link

@JesusDMedinaC-Bitso
After that, I added androidTestImplementation "androidx.test.ext:junit:1.1.3" as described in this post, and now I can run TestingCodeLab tests.
I'm having the same problem with the Navigation Codelab tests, but the same method may solve it.

@JesusDMedinaC-Bitso
Copy link
Author

@Corvus400
I wrote a little article that explain how to solve the android gradle setup:
https://medium.com/jesus-medina/android-test-and-compose-test-on-android-12-2f928c072724

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@Corvus400 @JesusDMedinaC-Bitso and others