alan_derua
alan_derua

Reputation: 2252

Android studio 2.3 generates aar instead of apk

Build > Build APK generates aar instead of apk.

Success window

In the outputs folder I have only the aar folder:

explorer

My build.gradle android section:

android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
defaultConfig {
    applicationId "my.cool.app"
    minSdkVersion 21
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    multiDexEnabled true;
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
packagingOptions {
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
}

}

What can the problem?

Upvotes: 1

Views: 1976

Answers (1)

AndroidRuntimeException
AndroidRuntimeException

Reputation: 2124

The problem is your Build APK is calling a wrong gradle function. Check your complie options in:

Android Studio / Preferences / Build, Executions and Deployment / Compiler

Android Studio / Preferences / Build, Executions and Deployment / Compiler

Also check your project configurations:

enter image description here

enter image description here

Upvotes: 2

Related Questions