Alpha Net
Alpha Net

Reputation: 37

How to handle that gradle error?

this is my app.gradle file :

apply plugin: 'com.android.application'
apply plugin: 'me.tatarka.retrolambda'
apply plugin: 'android-apt'

//apply plugin: 'com.neenbedankt.android-apt'

android {  
    compileSdkVersion 23  
    buildToolsVersion '27.0.3'  
    useLibrary 'org.apache.http.legacy'  

defaultConfig {
    applicationId "com.alpha"
    minSdkVersion 19
    targetSdkVersion 23
    versionCode 5
    versionName "1.0.2"
    multiDexEnabled true
}
buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

apt {
    arguments {
        androidManifestFile variant.outputs[0].processResources.manifestFile
        resourcePackageName android.defaultConfig.applicationId
    }
}

it runs correctly without any problems but when I update the compileSdkVersion from 23 to 27 and remove the apt lines of code it throws an error of can't resolve AndroidManifest.xml

Upvotes: 0

Views: 58

Answers (2)

Angus
Angus

Reputation: 3728

You can change your targetSdkVersion to 27 as well and update all your library to the corresponds version.

Get the library version here: Support Library version

Upvotes: 0

Ojasvi Bhargava
Ojasvi Bhargava

Reputation: 312

Change implementation in your gradle build file when you update from 23 to 27. The lines of code will look like this implementation 'com.android.support:appcompat-v7:27.0.0' testImplementation 'junit:junit:4.12'

Upvotes: 0

Related Questions