[JAVA] No static method getFont error

No static method getFont error

I got the above error and I will show you the solution.

[environment] Android OS version 7.0

Match devendency

It can be fixed by aligning the following in build.gradle.

  1. compileSdkVersion
  2. targetSdkVersion
  3. support Library verseion

Before correction

build.gradle


compileSdkVersion 27
targetSdkVersion 27
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:appcompat-v7:26.1.0'
    implementation 'com.android.support:recyclerview-v7:26.1.0'
    implementation 'com.android.support:design:26.1.0'
    implementation 'com.android.support:cardview-v7:26.1.0'
    implementation 'com.android.support:leanback-v17:26.1.0'
}

Revised

build.gradle


compileSdkVersion 27
targetSdkVersion 27
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1
    implementation 'com.android.support:leanback-v17:27.1.1'
}

I changed the place that was 26.1.0 to 27.1.1 according to compileSdkVersion. I had to match the version.

Recommended Posts

No static method getFont error
About No Method Error
[No Method Error] Solution when new action occurs
static factory method part 1
20 Corresponds to static method invocation
Benefits of Java static method
Spring Boot + PostgreSQL error resolution method
[Android] no such table error solution