Skip to content

Commit de78e2e

Browse files
Fix: compileSdkVersion causing cannot find symbol build error (#328)
* Downgrade the compileSdkVersion to 29 - P * Check the Build.VERSION against bigger than Q instead of P * Simplify the value passing to the accessibility launch
1 parent 588d5c3 commit de78e2e

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

example/android/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ buildscript {
44
ext {
55
buildToolsVersion = "29.0.3"
66
minSdkVersion = 21
7-
compileSdkVersion = 30
7+
compileSdkVersion = 29
88
targetSdkVersion = 29
99
}
1010
repositories {

src/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ReactNativeSlider_compileSdkVersion=30
1+
ReactNativeSlider_compileSdkVersion=29
22
ReactNativeSlider_buildToolsVersion=28.0.3
33
ReactNativeSlider_targetSdkVersion=27
44
ReactNativeSlider_minSdkVersion=16

src/android/src/main/java/com/reactnativecommunity/slider/ReactSliderManager.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,9 +149,8 @@ public void setValue(ReactSlider view, double value) {
149149
view.setOnSeekBarChangeListener(null);
150150
view.setValue(value);
151151
view.setOnSeekBarChangeListener(ON_CHANGE_LISTENER);
152-
if (view.isAccessibilityFocused() && Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
153-
int index = (int)value;
154-
view.setupAccessibility(index);
152+
if (view.isAccessibilityFocused() && Build.VERSION.SDK_INT > Build.VERSION_CODES.Q) {
153+
view.setupAccessibility((int)value);
155154
}
156155
}
157156

0 commit comments

Comments
 (0)