Home > Java > javaTutorial > Why Won't My App Compile After Upgrading to Android 12?

Why Won't My App Compile After Upgrading to Android 12?

DDD
Release: 2024-12-01 10:34:11
Original
479 people have browsed it

Why Won't My App Compile After Upgrading to Android 12?

After upgrading to android 12, the application won't compile. The error displayed in the Merged manifest is related to android:exported attribute which needs to be explicitly specified for components that have an intent filter defined. To fix this issue, you need to set the android:exported attribute to false for all the activities in your manifest file.

Here's an example of how to set the android:exported attribute:

<activity
    android:name=".ui.MainActivity"
    android:exported="false" />
Copy after login

Once you have set the android:exported attribute for all the activities in your manifest file, you should be able to compile your application without any errors.

The above is the detailed content of Why Won't My App Compile After Upgrading to Android 12?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template