简体   繁体   English

APK未安装在Real Device中

[英]Apk Not installing in Real Device

I Have started my new android project with Basic Default Activity.IT run fine in emulator .I Have tried to install iy in real device both pre lolipop and abovr lolipop device but getting error App cannot be installed error in prelolipop device and above lolipop device app will install but when i try to open app it will close 我已经使用基本默认活动启动了我的新android项目。它在模拟器中运行良好。我尝试在lolipop之前和abovr lolipop设备上的真实设备中安装iy,但出现错误App无法在prelolipop设备及以上lolipop设备应用中安装错误将安装,但是当我尝试打开应用程序时它将关闭

Can any one help how to fix this issue ? 任何人都可以帮助解决此问题吗?

Build.gradle Build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "com.example.myapp.myapplication"
        minSdkVersion 14
        targetSdkVersion 26
        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:26.+'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    testCompile 'junit:junit:4.12'
}

Your code is fine, my guess is that your APK is not completely built 您的代码很好,我想您的APK尚未完全构建

Build your APK: 建立您的APK:

  1. On Android Studio click on Build 在Android Studio上,单击构建
  2. Then click on Build APK(s) 然后点击构建APK

After that search for your debug APK and install it on your device 之后,搜索您的调试APK并将其安装在设备上

If this fails you can try ADB , take a look at the following guides for install and usage: 如果失败,则可以尝试ADB ,请参阅以下安装和使用指南:

Hope it helps 希望能帮助到你

Two things could be the problem. 有两件事可能是问题。

  1. Navigate to settings > security and make sure Unknown sources is checked. 导航到设置>安全性,并确保选中了未知来源。
  2. Make sure you downloaded the whole apk in the email 确保您已在电子邮件中下载了整个apk

Hope this helps! 希望这可以帮助!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM