Errors after Gradle update

2019-08-26 03:23发布

问题:

I installed Android Studio 3.3 Canary 13.

When open an app I wrote with earlier version on Android Studio I get a message saying Android Gradle Plugin Update is Required.

After update successfully finished I get lots of error in my code (red text) saying Cannot resolve method for findViewById, getString, startActivity, finish and more.

Following is my app gradle file -

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.shail.mycam"
        minSdkVersion 23
    targetSdkVersion 27
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
}
repositories {
mavenCentral()

}
dependencies {

implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
//    implementation 'com.google.firebase:firebase-invites:15.0.0'
implementation 'com.google.firebase:firebase-invites:11.8.0'
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 files('libs/ksoap2-android-assembly-2.4-jar-with-dependencies.jar')
implementation 'com.facebook.android:facebook-android-sdk:4.30.0'
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'

}

apply plugin: 'com.google.gms.google-services'

What changed in my app ?