0

I'm trying to upgrade the build.gradle of an app.

Gradle Version: 4.4  
Android Gradle Plugin Version: 3.1.0
android {
    compileSdkVersion 26
    buildToolsVersion '27.0.3'
    useLibrary 'org.apache.http.legacy'
    defaultConfig {
        applicationId "it.learn.myapp"
        minSdkVersion 23
        targetSdkVersion 26
        versionCode 68
        versionName "2.2 - 135"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        ndk { abiFilters "arm64-v8a", "armeabi", "armeabi-v7a", "x86", "x86_64" }
        //PASSAGGIO DA VERSIONE 32-BIT A 64-BIT, VEDI https://developer.android.com/distribute/best-practices/develop/64-bit
        //ndk.abiFilters = 'armeabi-v7a' 'arm64-v8a' 'x86' 'x86_64'
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }
}

I know I shouldn't fiddle with the minSdkVersion,targetSdkVersion and compileSdkVersion, since the target device uses API 26.
What I'm trying to understand is:

  • What changes does upgrading the Gradle Version and Gradle Plugin Version bring? I've tried upgrading them, and while the app compiles and works, the .apk is 20Mb, from 12Mb with the old Gradle & Plugin versions

I'm using the last version of Android (3.6.1 now)

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
Andy
  • 141
  • 3
  • 13
  • Sorry, I've deleted my comment after re-reading that bit myself. Thank you. – Andy Mar 03 '20 at 09:53
  • 1
    no problem, stack overflow works best if you ask one question at a time, otherwise your post becomes quite broad, so you might want to remove that from your original question :) – a_local_nobody Mar 03 '20 at 09:59
  • So from what I understand, ```compileSdkVersion``` (which is dependent on the ```targetSdkVersion``` ) and ```buildToolsVersion``` are used for building the app / .apk, and are not included in the .apk, since the device has the SDK / compile already. Is this corect? – Andy Mar 03 '20 at 10:10

0 Answers0