Android 8上的INSTALL_FAILED_NO_MATCHING_ABIS错误 [英] INSTALL_FAILED_NO_MATCHING_ABIS error on Android 8

查看:87
本文介绍了Android 8上的INSTALL_FAILED_NO_MATCHING_ABIS错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建连接我的Pixel手机的应用.我最近将手机升级到了Android8.在上一次升级之前,我可以在手机中构建并打开该应用程序,但是此升级后,我得到了失败的[INSTALL_FAILED_NO_MATCHING_ABIS:无法提取本机库,res = -113 ] 错误.

I am trying to build my app connecting my Pixel phone. I recently upgraded my phone to Android 8. I was able to build and open the app in my phone until the last upgrade, but after this upgrade, I get Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113] error.

下面是我的gradle文件.有人可以告诉我问题是什么吗?

Below is my gradle file. Can someone please tell me what is the issue ??

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion '26.0.1'
    defaultConfig {
        applicationId "com.my.app.googlemaps"
        minSdkVersion 16
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        vectorDrawables.useSupportLibrary = true
        multiDexEnabled = true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    splits {
        abi {
            enable true
            reset()
            include 'x86', 'armeabi-v7a'
            universalApk true
        }
    }
    lintOptions {
        abortOnError false
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
...
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

推荐答案

它有相同的问题,它是在替换一个具有不同commons-io的apache库(commons-io)之后工作的,来自另一个捆绑包.

It had the same problem, it worked after replacing an apache library (commons-io) with a different commons-io, that was from another bundle.

切换到新的开发设备(带有Android 8.0 Oreo的Pixel Phone)后,出现了问题.

The problem occured to me after switching to a new development device (Pixel Phone w/ Android 8.0 Oreo).

在您的情况下,您可以停止使用文件系统(compile fileTree(include: ['*.jar'], dir: 'libs'))中的本地jar,而使用Bintray中适当的gradle依赖项(例如).

In your case, you could stop using your local jars from the filesystem (compile fileTree(include: ['*.jar'], dir: 'libs')) and use proper gradle dependencies from bintray (e.g.).

错误: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

dependencies {
    compile 'org.apache.directory.studio:org.apache.commons.io:2.4'
    compile 'commons-cli:commons-cli:1.4'
}

使用适当的commons-io工件处理build.gradle:

Working build.gradle with proper commons-io artifacts:

dependencies {
    ...
    compile group: 'commons-io', name: 'commons-io', version: '2.5'
    compile group: 'commons-cli', name: 'commons-cli', version: '1.4'
    ...
}

忽略不同的依赖关系表示法,没关系

Ignore the different dependency notation, it doesn't matter

解决方案2

您定义了多个目标ABI,是否检查了设备支持的目标.也许您必须再添加一个,以便与您的设备ABI兼容.

Solution 2

You define multiple target ABI, did you check, which one your device supports. Perhaps you have to add another one, to be compatible to your device ABI.

您可以在 Application.mk

另请参见:

  • https://developer.android.com/ndk/guides/abis.html
  • https://developer.android.com/ndk/guides/application_mk.html
  • http://androidlad.blogspot.com/2016/10/installfailednomatchingabis-when.html
  • [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]
  • INSTALL_FAILED_NO_MATCHING_ABIS when install apk

这篇关于Android 8上的INSTALL_FAILED_NO_MATCHING_ABIS错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆