why i can't build apk not aar?

When I build my project I find aar file not apk file in the outputs folder.

Please tell me what's happened, is the error from gradle.Build or where?

This my gradle.Build:

apply plugin: 'com.android.library'

def computeVersionName() {
    return "1.0.12"
}
android {
    compileSdkVersion 28
    defaultConfig {
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 40
        versionName computeVersionName()
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    lintOptions {
        abortOnError false
    }
}

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    // android framework
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support:design:28.0.0'
    implementation 'com.android.support:cardview-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    // firebase sdk
    implementation 'com.google.firebase:firebase-core:17.2.0'
    implementation 'com.google.firebase:firebase-database:19.1.0'
    implementation 'com.google.firebase:firebase-storage:19.0.1'
    implementation 'com.google.firebase:firebase-crash:16.2.1'
    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    implementation 'com.google.firebase:firebase-auth:19.0.0'
    implementation 'com.google.firebase:firebase-firestore:21.1.0'
    implementation 'com.google.firebase:firebase-analytics:17.2.0'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    annotationProcessor 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'org.apache.httpcomponents:httpcore:4.4.10'
    implementation 'com.vanniktech:emoji-ios:0.5.1'

    implementation "com.daimajia.swipelayout:library:1.2.0@aar"
}
configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '26.1.0'
            }
        }
        // firebase resolution
        if (details.requested.group == 'com.google.firebase' ||
                details.requested.group == 'com.google.android.gms') {
            details.useVersion '11.8.0'
        }
    }
}
ext {

 bintrayRepo = 'maven'
    bintrayName = 'qchat'
    publishedGroupId = 'org.qchat.android'
    libraryName = 'qchat'
    artifact = 'qchat'
    libraryDescription = 'Android Chat SDK built on Firebase'
    libraryVersion = computeVersionName()
    developerId = 'qasimsalim'
    developerName = 'qasim salim'
    developerEmail = '[email protected]'
    licenseName = 'AGPL-V3'
    allLicenses = ["AGPL-V3"]
}

Upvotes: 0

Views: 145

Answers (1)

Shanker
Shanker

Reputation: 864

You have applied library plugin instead of application plugin. Replace "com.android.library" with "com.android.application" in your gradle file.

Upvotes: 2

Related Questions