简体   繁体   English

Android Studio安装失败,较旧的SDK

[英]Android Studio Install failed older sdk

im using Android Studio since a few days! 我从几天开始使用Android Studio! I want to use my phone(nexus 5 android version:4.4.3) as app-tester and debugger. 我想使用我的手机(nexus 5 android版本:4.4.3)作为应用测试器和调试器。 I've set my phone in target Device. 我已将手机设置在目标设备中。 There aren't usb-driver problem. 没有USB驱动程序问题。 The device is recognized by PC. 该设备可以被PC识别。 Ok!Now i've this problem: 好吧,现在我有这个问题:

Waiting for device.
Target device: lge-nexus_5-04e2b217251fce16
Uploading file
    local path: C:\Users\chaw359\AndroidStudioProjects\UGHO\app\build\outputs\apk\app-debug.apk
    remote path: /data/local/tmp/com.example.chaw359.ugho
Installing com.example.chaw359.ugho
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/com.example.chaw359.ugho"
pkg: /data/local/tmp/com.example.chaw359.ugho
Failure [INSTALL_FAILED_OLDER_SDK]

My app is a simple "Hello World", nothing problem with code! 我的应用程序是一个简单的“ Hello World”,代码没有问题! I want to understand why the installation fails! 我想了解为什么安装失败!

You can modified your build.gradle 您可以修改build.gradle

According to me: 据我说:

modified the minSdkVersion low. 修改了minSdkVersion低。

defaultConfig {
        applicationId "com.example.myapplication1"
        minSdkVersion 11
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }

-Go to built.gradle(module:app) inside gradle scripts -在gradle脚本中转到build.gradle(module:app)

-Check the SDK or API version of the virtual device or the real device that you -检查您所使用的虚拟设备或真实设备的SDK或API版本
are using 正在使用

-set the the minSdkVersion to be less than or equal to that of your devices API/SDK version -将minSdkVersion设置为小于或等于您设备的API / SDK版本

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

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