react-native-clipboard / clipboard

React Native Clipboard API for both iOS and Android.
MIT License
690 stars 142 forks source link

Build failed on android react native clipboard ^1.8.5 cannot find symbol if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) #151

Closed banghia112 closed 2 years ago

banghia112 commented 2 years ago

Environment

System: OS: macOS 11.6 CPU: (8) arm64 Apple M1 Memory: 338.73 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 18.3.0 - /opt/homebrew/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 8.11.0 - /opt/homebrew/bin/npm Watchman: HEAD-51a3b89 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /Users/admin/.rvm/gems/ruby-2.7.4/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.0.1, iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0 Android SDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7784292 Xcode: 13.1/13A1030d - /usr/bin/xcodebuild Languages: Java: 11.0.11 - /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/javac Python: 3.8.6 - /Users/admin/.pyenv/shims/python npmPackages: @react-native-community/cli: Not Found react: 16.13.1 => 16.13.1 react-native: 0.63.2 => 0.63.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Platforms

Android

Versions

Description

Today i was building my debug app on android as usual but i got this: image

i tried: running./gradlew clean and upgrading the library but didnt help Any suggestions? Thanks

Naturalclar commented 2 years ago

@banghia112 seems like the targetSDKVersion you're using doesn't include Build.VERSION_CODES.R , I'll make a fix for that

Marcuspo commented 2 years ago

+1

arohablue commented 2 years ago

+1

Valentin-viseo commented 2 years ago

+1

Nziranziza commented 2 years ago

+1

Harsha171819 commented 2 years ago

+1

sam9010 commented 1 year ago

Hi, my app have this error. I use targetSdkVersion = 28 => if be 30, my project will not have error?