Android的错误没有,minSdk(API 19)GT; deviceSdk(API 1) [英] Android error No, minSdk(API 19) > deviceSdk(API 1)

查看:796
本文介绍了Android的错误没有,minSdk(API 19)GT; deviceSdk(API 1)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚设置了Android的工作室,我试图编译我的第一个项目。该项目被编译,但是当选择设备菜单中打开设备和状态显示为[OFFLINE]兼容给出的Andr​​oid消息的错误消息的Andr​​oid错误
不,minSdk(API 19)GT; deviceSdk(API 1)
 这是什么意思?我该如何解决呢?

我build.grandle文件看起来像这样

 应用插件:'com.android.application安卓{
    compileSdkVersion 21
    buildToolsVersion21.1.2    defaultConfig {
        的applicationIDcom.yaron.myapplication
        19的minSdkVersion
        targetSdkVersion 21
        版本code 1
        的versionName1.0
    }
    buildTypes {
        发布 {
            minifyEnabled假
            proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
        }
    }
}依赖{
    编译文件树(导演:'库',包括:['的* .jar'])
    编译com.android.support:appcompat-v7:22.0.0
}


解决方案

有几件事情来检查。

如果你到Android Studio中的终端窗口,cd到你的SDK平台工具安装路径(类似于C:\\ Android的\\ SDK \\平台工具),然后运行以下命令

ADB设备

你有一个设备上市?如果没有,那么你不具备设备安装不当,或者正确的驱动程序。

在电话确认您已启用开发人员选项(进入设置 - >关于手机,然后点击7次版本号左右)

一旦你已经启用了进入发展下设置选项,并确保USB调试启用。

如果 ADB设备说你要连接设备的没有权限,请务必将其先连接为MTP装置。这将隐含提示您输入电脑的指纹,并允许USB调试将来的连接也是如此。

I have just set up android studio and am trying to compile my first project. The project gets compiled but when the 'Choose Device' menu opens the device and state is shown as [OFFLINE] and compatible gives message Android error message Android error 'No, minSdk(API 19) > deviceSdk(API 1)' What does this mean? How can I solve it?

my build.grandle file looks like this

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.yaron.myapplication"
        minSdkVersion 19
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:22.0.0'
}

解决方案

There are a few things to check.

if you go to the terminal window in Android Studio and cd to the path where your sdk platform tools are installed (something like C:\Android\SDK\platform-tools ) and run the following command

adb devices

Do you have a device listed? If not then you don't have the device setup properly, or the correct drivers.

On the phone make sure that you have developer options enabled (go to settings->about phone and click on the Build Number 7 times or so)

Once you have enabled that go into the develop options under settings and make sure USB debugging is enabled.

If adb devices said "no permission" for the device you are connecting, make sure to connect it as MTP device first. This will implicitly prompt you to import the computer's fingerprint and allow future connections for USB debugging as well.

这篇关于Android的错误没有,minSdk(API 19)GT; deviceSdk(API 1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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