错误(INSTALL_FAILED_INVALID_APK)

时间:2017-07-20 12:36:59

标签: java android apk

我一直收到此错误消息。你可以帮帮我吗?

  

07/20 15:28:03:启动app $ adb push C:\ Users \ La la   Meesh \桌面\ ELM \ Veery \ myVeery \程序\编译\输出\ APK \ APP-debug.apk   / data / local / tmp / myveery $ adb shell pm install -r   " /数据/本地的/ tmp / myveery" pkg:/ data / local / tmp / myveery失败   [INSTALL_FAILED_INVALID_APK]

     

$ adb shell pm uninstall myveery未知失败(失败)错误   安装APK

AndroidMainfest.xml

<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<uses-feature
    android:name="android.hardware.camera"
    android:required="true" />

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"
    android:name="myveery"
    android:label="@string/app_name"
    android:roundIcon="@mipmap/ic_launcher_round"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity
        android:name=".myVs"
        android:label="@string/app_name"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name=".NewVeery"
        android:parentActivityName=".myVs">
        <meta-data
            android:name="android.support.PARENT_ACTIVITY"
            android:value=".myVs" />
    </activity>

    <activity
        android:name=".LoginActivity"
        android:label="@string/title_activity_login"></activity>

    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="com.example.android.fileprovider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/file_paths"></meta-data>
    </provider>

</application>

,这是

build.gradle(Module:app)

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.3"
    defaultConfig {
        applicationId "myveery"
        minSdkVersion 15
        targetSdkVersion 25
        multiDexEnabled true
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    } }

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:25.2.0'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.support:design:25.2.0'
    compile 'com.github.bumptech.glide:glide:3.7.0'
    testCompile 'junit:junit:4.12' }

1 个答案:

答案 0 :(得分:0)

您的应用设置的 MinSdkVersion 是否正在运行您的设备。您也可以检查本机库支持。您可以使用应用程序和所有内容,但它们不会提供所有CPU体系结构信息。对于使用简单adb命令的Android设备,它会为您提供有关设备的所有信息。例如,通过cmd或terminal发出以下命令,以查找设备是arm,arm 64还是x86:

adb shell getprop ro.product.cpu.abi