Skip to content
This repository has been archived by the owner on Nov 7, 2023. It is now read-only.

Does not work with Android 12 (sdk 31) #96

Open
deafol opened this issue Sep 23, 2022 · 6 comments
Open

Does not work with Android 12 (sdk 31) #96

deafol opened this issue Sep 23, 2022 · 6 comments

Comments

@deafol
Copy link

deafol commented Sep 23, 2022

Tried everything in my power (and very restricted Android knowledge) to get the package to work in my react-native project having targetSdkVersion 31 (btw needed to be able to properly run the app with RN 0.70.x on a M1 macbook).
Whatever I do and change (upgrade/downgrade dependencies, change manifest settings) I keep getting the same error that boils down to something like:

<project-root>/node_modules/react-native-encrypted-storage/android/build/intermediates/tmp/manifest/androidTest/debug/tempFile1ProcessTestManifest10103025503043671682.xml:27:9-33:20 Error:
        android:exported needs to be explicitly specified for element <activity#androidx.test.core.app.InstrumentationActivityInvoker$BootstrapActivity>. 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.

It just seems react-native-encrypted-storage just does not support Android 12, or I don't know how to properly configure it.

So I just hacked the build.gradle like this (line 28)

targetSdkVersion project.properties>  ['EncryptedStorage_targetSdkVersion'].toInteger()

in order to make it build with the package's pre-scripted sdk version (29)

Obviously I would love to see this fixed properly or get help in how to configure it to work.
Itmt I can also create a PR to promote this hack, just let me know pls.

@marcoXbresciani
Copy link

Same for me, with latest RN 0.70.4, latest node LTS (18.12.1) and NPM 8.19.2.

@asdolo
Copy link

asdolo commented Nov 7, 2022

Same for me, with latest RN 0.70.4, latest node LTS (18.12.1) and NPM 8.19.2.

Update to RN 0.70.5. See this issue.

@pawelkiszka
Copy link

Update to RN 0.70.5 does not fix the issue

@camchis
Copy link

camchis commented Dec 1, 2022

This seems to be the only fix that works for me, hopefully it gets merged + released soon

@ablack34
Copy link

ablack34 commented Feb 6, 2023

Hey, I am upgrading my app from RN v0.68.6 to RN v0.70.7 and I ran into this issue. It wasn't an issue at RN v0.68.6 even though I was targeting Android 12 (31). Any further developments on a solid solution?

@MaiconGilton
Copy link

MaiconGilton commented Aug 2, 2023

I am facing the same error on RN v0.72.3 and Android 13. Any solution? For the moment I switched to react-native-async-storage, it works!

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

No branches or pull requests

7 participants