从Android Studio运行时安装APK时应用程序崩溃完美无缺

ASI*_*AZA 5 android android-studio

我最近将Android Studio更新为2.3,将SDK更新为25.现在,当我在我的手机或模拟器上运行Android Studio应用程序时,它运行正常但是当我生成APK或从应用程序获取APK并在设备上安装时会崩溃.

apply plugin: 'com.android.application'
    android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "lovestar.lycamobile"
    minSdkVersion 15
    targetSdkVersion 25
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
Run Code Online (Sandbox Code Playgroud)

}

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'
testCompile 'junit:junit:4.12'
Run Code Online (Sandbox Code Playgroud)

}

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="lovestar.lycamobile">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<application
    android:allowBackup="true"
    android:icon="@mipmap/lycalogo"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <activity android:name="lovestar.lycamobile.MainActivity">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity android:name="lovestar.lycamobile.Lyca"></activity>
</application>
Run Code Online (Sandbox Code Playgroud)

Pra*_*nth 2

\n

\xe2\x80\x9cApplication not Installed\xe2\x80\x9d 错误的可能/常见原因

\n
\n\n
    \n
  • 存储空间不足:您的存储空间可能已满\n,没有更多空间来容纳新应用。

  • \n
  • 应用程序或 apk 文件损坏:这种情况在从 Google Play 商店外部下载的应用程序中最为常见。该应用程序可能已损坏或未完全下载或复制(视情况而定)。

  • \n
  • 应用程序安装位置不正确:某些应用程序只能安装在手机内存上,而另一些应用程序则可以安装在手机内存和 SD 卡上。尝试对前者进行其他操作可能会出现此错误。

  • \n
  • 安装在已安装的 SD 卡上:也许您的 SD 卡安装在笔记本电脑或其他地方。尝试在此状态下安装任何内容都会导致错误,因为 SD 卡无法访问。

  • \n
  • 存储损坏(手机和 SD 卡):这可能是导致此错误的最常见原因。如果您的设备存储损坏,则无法安装任何应用程序。

  • \n
  • Apk 签名/证书冲突:在同一设备上安装另一个版本的应用程序(具有不同的签名证书)可能会导致此错误。安装未签名的应用程序也可能导致此错误。\n应用程序权限错误或临时操作系统故障也可能导致此错误。

  • \n
\n\n

我认为您没有以正确的方式导出 APK,这就是您收到此错误的原因。

\n