Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[SOLVED] How I change the compileSdkVersion in build.gradle

Status
Not open for further replies.

BiNa2605

Full Member level 3
Joined
Sep 1, 2015
Messages
179
Helped
6
Reputation
12
Reaction score
4
Trophy points
18
Location
VietNam
Activity points
1,357
Hi everyone,

I have an android project and I want to change the SdkVersion in build.gradle file. How can I do that?

Code:
apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"
    defaultConfig {
        applicationId 'it.polimi.deib.p2pchat'
        minSdkVersion 19
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    productFlavors {
    }
}

task wrapper(type: Wrapper) {
    gradleVersion = "2.5"
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    provided 'org.projectlombok:lombok:1.16.4'
    compile 'com.android.support:appcompat-v7:22.2.1'
    compile 'com.android.support:support-v4:22.2.1'
    compile 'com.android.support:recyclerview-v7:22.2.1'
    compile 'com.android.support:cardview-v7:22.2.1'
    compile 'com.jpardogo.materialtabstrip:library:1.0.6'
}

For example I want to change Sdk version 22 to version 16.
 

I strongly recommend you create a new design at the new IDE version instead of try doing that manually, due to the unknown dependencies differences from each build revision.
 

I fixed. First one I change the minSdkverion (after that I sync gradle button) and also modified in AndroidManifest.xml file.
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top