Android 错误 否,minSdk(API 19) >设备SDK(API 1) [英] Android error No, minSdk(API 19) > deviceSdk(API 1)

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

问题描述

我刚刚建立了 android studio,正在尝试编译我的第一个项目.项目被编译但是当选择设备"菜单打开设备并且状态显示为 [OFFLINE] 并且兼容时会给出消息 Android 错误消息 Android 错误'不,minSdk(API 19) >deviceSdk(API 1)'这是什么意思?我该如何解决?

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?

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

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'
}

推荐答案

有几件事需要检查.

如果您转到 Android Studio 中的终端窗口并 cd 到安装 sdk 平台工具的路径(类似于 C:AndroidSDKplatform-tools)并运行以下命令

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:AndroidSDKplatform-tools ) and run the following command

adb 设备

您是否列出了设备?如果不是,那么您的设备设置不正确,或驱动程序不正确.

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

在手机上确保您启用了开发者选项(转到设置->关于手机,然后点击内部版本号 7 次左右)

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)

启用后,进入设置下的开发选项,并确保启用 USB 调试.

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

如果adb devices 对您要连接的设备说无权限",请确保先将其连接为 MTP 设备.这将隐式提示您导入计算机的指纹,并允许将来进行 USB 调试连接.

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) >设备SDK(API 1)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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