尝试在手机上安装/运行Android应用程序时失败[INSTALL_FAILED_NO_MATCHING_ABIS]错误(非模拟器)

时间:2016-10-01 20:41:57

标签: android android-studio installation

由于没有匹配的ABIS,当我尝试从Android工作室在我的手机上运行我的应用程序时,我收到安装失败错误但我不确定这是怎么回事,因为我正在使用手机而不是一个模拟器。我已经卸载了现有的应用程序,重新启动了手机,重新启动了我的电脑,并更新了android studio并且没有运气。由于仿真体系结构的问题,我不确定是什么原因引起的(因为我的理解)。应该注意的是,错误最近才开始,我的版本历史记录没有任何明显的变化。我正在使用htc one m8(使用带有arm v7 rev.1架构的snapdragon 801处理器)运行android 6.0和我的应用程序级别gradle构建如下:

android {
    compileSdkVersion 23
    buildToolsVersion '24.0.2'

    defaultConfig {
        applicationId "REDACTED"
        minSdkVersion getMinSdk()
        targetSdkVersion 22
        versionCode 131
        versionName "1.2.58"
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
        renderscriptTargetApi 18
        renderscriptSupportModeEnabled true
    }
    signingConfigs {
        debug {
            storeFile rootProject.file("keys/debug.keystore")
            v2SigningEnabled false
        }
        release {
           REDACTED
        }
    }
    buildTypes {
        release {
            buildConfigField "boolean", "CRASHLYTICS", "true"
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            ext.betaDistributionGroupAliases = "testers"
            signingConfig signingConfigs.release
        }
        debug {
            buildConfigField "boolean", "CRASHLYTICS", "false"
            ext.betaDistributionGroupAliases = "testers"
            applicationIdSuffix ".debug"
        }
        staging.initWith(buildTypes.debug)
        staging {
            buildConfigField "boolean", "CRASHLYTICS", "true"
            ext.betaDistributionGroupAliases = "testers"
            applicationIdSuffix ".staging"
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    packagingOptions {
        exclude 'META-INF/services/javax.annotation.processing.Processor'
    }
    sourceSets {
        main {
            svg.srcDir 'src/main/svg'
        }
    }
    splits {
        abi {
            enable true
            reset()
            include 'armeabi-v7a', 'mips', 'x86'
            universalApk true
        }
    }
}

victor {
    // Do not generate these densities for SVG assets
    excludeDensities = ['ldpi']
}

def getMinSdk() {
    for (String taskName : project.getGradle().startParameter.taskNames) {
        if (taskName.toLowerCase().contains("debug")) {
            return 21
        }
    }

    return 15
}

dependencies {
    compile 'com.android.support:multidex:1.0.1'
    compile 'com.android.support:design:23.4.0'
    compile 'com.android.support:support-v4:23.4.0'
    compile 'com.android.support:appcompat-v7:23.4.0'
    compile 'com.android.support:recyclerview-v7:23.4.0'
    compile 'com.android.support:cardview-v7:23.4.0'
    compile 'com.google.android.gms:play-services-location:8.4.0'
    compile 'com.google.android.gms:play-services-gcm:8.4.0'
    compile 'com.google.android.gms:play-services-analytics:8.4.0'
    compile 'io.branch.sdk.android:library:1.+'
    compile 'com.trello:rxlifecycle:0.6.1'

    compile 'jp.wasabeef:recyclerview-animators:1.3.0@aar'
    compile('com.crashlytics.sdk.android:crashlytics:2.6.2@aar') { transitive = true; }

    compile('com.facebook.android:facebook-android-sdk:4.10.1') { exclude module: 'support-v4' }
    compile('com.twitter.sdk.android:twitter-core:1.6.6@aar') { transitive = true; }
    compile('com.twitter.sdk.android:tweet-composer:1.0.5@aar') {
        transitive = true;
    }

    compile 'com.appyvet:materialrangebar:1.0'
    compile 'uk.co.chrisjenx:calligraphy:2.1.0@aar'
    compile 'com.jakewharton:butterknife:7.0.1'
    compile 'com.jakewharton.timber:timber:3.1.0'

    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.squareup.okio:okio:1.6.0'
    compile 'com.squareup.okhttp:okhttp:2.5.0'
    compile 'com.squareup.retrofit:retrofit:1.9.0'
    compile 'com.squareup:otto:1.3.8'

    compile 'io.reactivex:rxjava:1.1.8'
    compile 'com.jakewharton.rxrelay:rxrelay:1.0.0'
    compile 'io.reactivex:rxandroid:1.1.0'

    apt 'com.google.dagger:dagger-compiler:2.5'
    compile 'com.google.dagger:dagger:2.5'
    provided 'org.glassfish:javax.annotation:10.0-b28'

    debugCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
//    debugCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta2'
    stagingCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
    releaseCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'
    testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta2'

}

android.applicationVariants.all { variant ->
    // assign different version code for each output
    variant.outputs.each { output ->
        // Filter is null for universal APKs.
        def filter = output.getFilter(OutputFile.ABI)

        if (!android.splits.abi.universalApk) {
            // change the version codes
            output.versionCodeOverride =
                    project.ext.versionCodes.get(filter) * 1000000 + android.defaultConfig.versionCode
        }

        if (filter == null) {
            tasks.findAll {
                it.name.startsWith(
                        "crashlyticsUploadDistribution${variant.name.capitalize()}")
            }.each {
                it.doFirst {
                    ext.betaDistributionApkFilePath = output.outputFile.absolutePath
                }
            }
        }
        if (filter == null) {
            tasks.findAll {
                it.name.startsWith(
                        "crashlyticsUploadSymbols${variant.name.capitalize()}")
            }.each {
                it.doFirst {
                    ext.betaDistributionApkFilePath = output.outputFile.absolutePath
                }
            }
        }
    }
}

apply plugin: 'com.google.gms.google-services'

0 个答案:

没有答案