セカイノカタチ

世界のカタチを探求するブログ。関数型言語に興味があり、HaskellやScalaを勉強中。最近はカメラの話題も多め

久しぶりにAndroid開発でAndroidStudioを使ったらつまずいた

なんか、SDKのバージョンがー。とか、ごちゃごちゃエラーが出てうざい。

どうやら、インストール時にSDKのバージョンが最新でないと不整合を起こす模様。

app/build.gradleの中身を見る

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "com.qtamaki.myapplication"
        minSdkVersion 15
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile 'com.android.support:design:23.1.1'
}

compileSdkVersion と下記の赤枠の数字が合っていること。そんで最新。

f:id:qtamaki:20160108192809p:plain

buildToolsVersion と下記の赤枠の数字が合っていること。そんで最新。

f:id:qtamaki:20160108192849p:plain

dependencies の com.android.support:appcompat-v7 と com.android.support:design の数字と、下記の赤枠の数字が合っていること。

f:id:qtamaki:20160108193012p:plain

この辺をチェックするとすっきりするっぽ。