AndroidX support
See original GitHub issueEnvironment
React Native Environment Info:
System:
OS: macOS 10.14.5
CPU: (8) x64 Intel(R) Core(TM) i7-3615QM CPU @ 2.30GHz
Memory: 78.93 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.12.0 - ~/.nvm/versions/node/v8.12.0/bin/node
Yarn: 1.16.0 - /usr/local/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.12.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 23, 24, 28
Build Tools: 23.0.1, 23.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.1, 26.0.2, 26.0.3, 27.0.0, 27.0.3, 28.0.2, 28.0.3
System Images: android-26 | Google APIs Intel x86 Atom_64
IDEs:
Android Studio: 3.4 AI-183.6156.11.34.5522156
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.6 => 16.8.6
react-native: 0.59.9 => 0.59.9
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
CalendarEvents.java:14: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
^
symbol: class ActivityCompat
location: package android.support.v4.app
CalendarEvents.java:15: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
and other similar errors
Issue Analytics
- State:
- Created 4 years ago
- Reactions:7
- Comments:16 (1 by maintainers)
Top Results From Across the Web
AndroidX Overview - Android Developers
AndroidX is a major improvement to the original Android Support Library, which is no longer maintained. androidx packages fully replace the ...
Read more >android - What is AndroidX? - Stack Overflow
AndroidX is a major improvement to the original Android Support Library. Like the Support Library, AndroidX ships separately from the Android OS ...
Read more >Migrating to AndroidX: tips, tricks, and guidance - Medium
The time is right now to migrate from using the Android Support Library to AndroidX. There are four reasons behind this: The Android...
Read more >Difference Between AndroidX and Android Support Libraries
Support library packages in Android are a set of code libraries whose prime purpose is to provide backward-compatibility to the code and ...
Read more >What Is AndroidX?. New Era of Android Support libraries
AndroidX is a new way of organizing support libraries introduced by Google. Basically, AndroidX. is introduced along with Android Jetpack because jetpack ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am getting the same error.
error: package android.support.v4.content does not exist import android.support.v4.content.ContextCompat;
error: cannot find symbol ActivityCompat.requestPermissions(currentActivity, new String[]{
symbol: variable ActivityCompat location: class CalendarEvents error: cannot find symbol int writePermission = ContextCompat.checkSelfPermission(reactContext, Manifest.permission.WRITE_CALENDAR);
symbol: variable ContextCompat location: class CalendarEvents
error: cannot find symbol int readPermission = ContextCompat.checkSelfPermission(reactContext, Manifest.permission.READ_CALENDAR);
symbol: variable ContextCompa
I just created a PR https://github.com/wmcmahan/react-native-calendar-events/pull/263