1

I have this code as my build.gradle file i checked out various similar questions on stackoverflow but could not get a clear idea about the approach.Can anyone helpout?

apply plugin: 'com.android.application'

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.example.bluetoothchatapp"
        minSdkVersion 17
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    } }

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'

}
  • Possible Reasons 1. Missing or misplaced `buils.gradle(project)`. You can redownload it if your project is on a Git repository. 2. Gradle version is incompatible with your Android Gradle Plugin. You can see and edit this from `File > Project Structure` or by pressing `Ctrl+alt+Shift+S` 3. If the following files are missing and you can not redownload it, create a new project and successfully build it. then copy the files from there. [Kindly see this image to get the idea](https://i.stack.imgur.com/lvVjx.png) – Bilal Bin Zia Dec 03 '20 at 08:42

0 Answers0