-
Notifications
You must be signed in to change notification settings - Fork 291
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
AndroidX support #254
Comments
I am getting the same error.
error: package android.support.v4.content does not exist error: cannot find symbol symbol: variable ActivityCompat symbol: variable ContextCompat error: cannot find symbol symbol: variable ContextCompa |
Updating the imports in the Java files with the new AndroidX imports resolves the issue. |
I am getting the same error. |
The AndroidX migration link has the new import names. android.support.v4.app.ActivityCompat should be replaced with androidx.core.app.ActivityCompat. Repeat for any other missing imports. They're all listed on the migration page. |
I have followed the same steps. and got the same error then I did this. 1. Removed these lines android.useAndroidX=true from gradle.properties 2. Change the version of react-native-device-info from 0.21.5 to 2.1.2. After changing this I got following error. FAILURE: Build failed with an exception. What went wrong: And then added the following code in android/build.gradle in subprojects section
then it works for me |
Use this script migrate to androidx. |
Appreciate you working on this @wmcmahan. But with the release of 0.60 there is a more prominent need for a proper solution. The workaround provided by @irfanshaikh138 didn't really work for my 0.60.3 environment and caused a bunch of
Is there a proper way to get this going? Thanks a lot! |
I just created a PR #263 |
It looks like that for some reason react-native calendars is the PackageList file used in Application file here
PackageList.java
This means that altough react-native-calendar-events is not in react-native-community, it is being imported as default for rn version > 0.61 This means that there is no need for all setup of this library in MainActivity and MainApplication, setting.gradle and gradle files. Which would remove these error warnings. |
@camposbrunocampos , thanks for clarifying this. As the promise on my So perhaps I thought it was because I needed to run I am aware that a lot of third-party libraries are not updating their documentation now that RN 60ish does automatic linking behind the scenes, so its a confusing time to be using so many third-party packages. |
@roshan-p , your issue can be resolved by running Anyone have a working lib on RN 60+ for Android? Please help. Mine works on
For |
We experienced that on Android you need to find the primary calendar before you can safe in it:
|
@taschik , I think you are on to a solution here, but where are you getting the variable This is how I have it setup and what I have tried:
|
Oh that’s just loadash that we use. |
@taschik , oh, shouldn't it then be UPDATE After adding your code snippet, it seemed like my application was starting to work, but then it went back to giving me the Oops something went wrong alert:
Could I have missed a step here:
What did you do with the |
Android X support has been added in #263 |
Environment
Steps to Reproduce
add
android.useAndroidX=true
android.enableJetifier=true
to
gradle.properties
and use
react-native run-android
Expected Behavior
Compile and run app
Actual Behavior
It throws
and other similar errors
The text was updated successfully, but these errors were encountered: