0

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

Abhinav Suman
  • 940
  • 1
  • 9
  • 29
Alpha Net
  • 37
  • 7

2 Answers2

0

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'

Ojasvi Bhargava
  • 312
  • 1
  • 2
  • 10
0

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

Angus
  • 3,680
  • 1
  • 12
  • 27