I know that there are many questions about the API level and version of Android, but this question is different, so please do not mark it as a duplicate.
I am wondering how Java version 1.6, 1.7, 1.8 ... relates to these two. The source of my confusion I am trying to use Pattern.compile
a Pattern.UNICODE_CHARACTER_CLASS
flag method as shown below.
Pattern pattern = Pattern.compile("\\b" + keywordToCheck + "\\b", Pattern.UNICODE_CHARACTER_CLASS);
The documents to Pattern.UNICODE_CHARACTER_CLASS
say that he says that: 1.7: I guess it's available in a Java version 1.7 or higher. I try to use this line of code in an Android project, but every time I run it on my device, I get:
java.lang.IllegalArgumentException: Unsupported flags: 256
Below are the relevant parts of my build.gradle file.
defaultConfig {
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
, , API 19 , , Android 4.4 (KitKat) . , , Android 6.0. Java-? Android Studio 3.0, , :
Android Studio 3.0
Build #AI-171.4408382, built on October 20, 2017
JRE: 1.8.0_152-release-915-b08 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Mac OS X 10.12.6
- , , API API, Java?