4

Complete gradle file, and even unable to resolve the symbol 'AppCompatActivity'. Don't understand what's wrong.

Already tried options :: 1) Clean and Rebuild 2) Invalidate/Catches and Restart

apply plugin: 'com.android.application'
apply plugin: 'com.jfrog.bintray'

repositories {
    jcenter()
    maven {
        url "https://jitpack.io"
    }
}

android {
    compileSdkVersion 27
    buildToolsVersion "27.0.3"

    defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 19
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    testImplementation 'junit:junit:4.12'
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation project(':blocklylib-core')
    implementation project(':blocklylib-vertical')
}
Android Guy
  • 573
  • 1
  • 8
  • 18

3 Answers3

4

For SDK 27 and higher use import androidx.core.view.ViewCompat;

Developer
  • 41
  • 1
2

Retype the AppCompatActivity in MainActivity/Classes

And delete old imports in your MainActivity/Classes

shyam
  • 1,084
  • 12
  • 20
2

Add this in your build.gradle file-

implementation 'com.android.support:support-v13:26.0.2'

Now,
Delete "/.idea/libraries" and then synced with gradle and built again.

IntelliJ Amiya
  • 74,896
  • 15
  • 165
  • 198
Ankita
  • 1,129
  • 1
  • 8
  • 15