最終更新:2021-12-07 (火) 00:17:17 (247d)  

Android Studio/プロジェクト/app/build.gradle

  • apply plugin: 'com.android.application'
    
    android {
        compileSdkVersion 23
        buildToolsVersion "23.0.2"
    
        defaultConfig {
            applicationId "com.example.tokkyo.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.2.0'
        compile 'com.android.support:design:23.2.0'
    }
    

Android Studio 2.2からのAndroid NDK対応

CMakeを使う場合

  • android {
    ...
        externalNativeBuild {
            cmake {
                path "src/main/cpp/CMakeLists.txt"
            }
        }
    ...
    }

ndk-buildを使う場合

  • android {
    ...
        externalNativeBuild {
            ndkBuild {
                path 'src/main/cpp/Android.mk'
            }
        }
    ...
    }

メモ

関連