react-native-image-crop-picker icon indicating copy to clipboard operation
react-native-image-crop-picker copied to clipboard

Activity inside Manifest file require exported tag to Support Android 12

Open e-pradeep opened this issue 3 years ago • 2 comments

According to latest updates "Starting in November 2022, app updates must target API level 31 or above and adjust for behavioral changes in Android 12"

When targeting to Android 12, getting build error:

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.

These are the activity inside the manifest without exported tag com.yalantis.ucrop.UCropActivity

react-native-image-crop-picker-version: 0.37.3

https://developer.android.com/google/play/requirements/target-sdk#:~:text=Starting%20in%20August%202022%2C%20new,behavioral%20changes%20in%20Android%2012

e-pradeep avatar Jul 21 '22 11:07 e-pradeep

Hello, are you sure the com.yalantis.ucrop.UCropActivity has an intent filter defined ?

Updated

After facing this issue for few days, I have found that this link is very useful. https://stackoverflow.com/questions/69287478/androidexported-added-but-still-getting-error-apps-targeting-android-12-and-hig

This issue originates from dependencies of project. Right click on intent-filter and select find usages option. Now, in all usage places check that if exported assigned value or nor. If not, assign a value (Even in cache folders for libraries). This will fix issue until cache refresh but you have identifies the libraries creating this problem.

By using this to find all inten-filter usages in the project, I have found that I am using an old instabug version which caused the problem.

  1. Consider to update androidx related to the latest one.

I don't think it is a must to add exported tag to this activity as it does not use intent-filter

mickeylam avatar Aug 16 '22 07:08 mickeylam

Hi there! I posted about this on another issue: https://github.com/ivpusic/react-native-image-crop-picker/issues/1428#issuecomment-1240053429

Hope that helps!

mattjbrill avatar Sep 09 '22 20:09 mattjbrill