chrisjenx / Calligraphy

Custom fonts in Android the easy way...
Apache License 2.0
8.59k stars 1.1k forks source link

Cannot resolve symbol 'CalligraphyContextWrapper' #449

Closed danishsharma1993 closed 6 years ago

danishsharma1993 commented 6 years ago

Till yesterday everything was working fine and Today i have updated my Android studio from 2.3 to 3.1 and i am getting this error now. But even i am getting Cannot resolve symbol 'CalligraphyContextWrapper', still project is successfully clean and build and the font is changing fine. I am surprised if everything is working fine then why this error appears. You can see the error in image and also i am adding my gradle code below. Please let me know if i am doing something wrong.

calligraphycontextwrapper not found

build.grade:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3"
    defaultConfig {
        applicationId "com.package"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.2"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    allprojects {
        repositories {
            jcenter()
            maven {
                url "https://maven.google.com"
            }
        }
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation  'com.android.support:appcompat-v7:27.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:design:27.0.0'
    implementation 'com.android.support:cardview-v7:27.0.0'
    /* Retrofit */
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1'
    implementation 'com.squareup.retrofit2:adapter-rxjava2:2.3.0'
    implementation 'com.google.code.gson:gson:2.7'
    implementation 'com.squareup.okhttp3:okhttp:3.4.2'
    //multi dex
    implementation 'com.android.support:multidex:1.0.1'
    //Picasso
    implementation 'com.squareup.picasso:picasso:2.5.2'
    //Buimplementationtter knife
    implementation 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    //planet payment gateway
    implementation 'com.google.android.gms:play-services-wallet:11.0.4'
    //font
    implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
    implementation 'io.card:android-sdk:5.5.1'
}
bmattoso commented 6 years ago

Same issue here

danishsharma1993 commented 6 years ago

Hi @BruninhoMattoso You have to use implementation 'uk.co.chrisjenx:calligraphy:2.2.0'. Please follow IntelliJ Amiya answer https://stackoverflow.com/questions/50171778/cannot-resolve-symbol-calligraphycontextwrapper

amiyo-biswas commented 6 years ago

Just downgrade version.

implementation 'uk.co.chrisjenx:calligraphy:2.2.0'