显示错误,当创建Android Studio中一个新的项目 [英] Showing error when create a new Project in Android Studio

查看:200
本文介绍了显示错误,当创建Android Studio中一个新的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要创建Android Studio中一个新的Andr​​oid项目,但完成了创建项目给我这样的错误

I want create a new Android project in Android Studio, but finished the create project show me this errors

我的Andr​​oid Studio版本:1.3.2

My Android Studio version : 1.3.2

错误图像

请帮我解决这个问题。

推荐答案

您正在使用的支持库V23 ,您必须编译API23 您的项目。

You are using the support libraries v23,you have to compile your project with API23.

在你的的build.gradle 修改 compileSdkVersion 23

  compileSdkVersion 23

如果你不希望使用API​​ 23进行编译(注意,compileSdk和targetSdk是不同的),您必须使用支持库V22(带api22编译)。

If you don't want to use api 23 to compile (pay attention, compileSdk and targetSdk are different), you have to use the support libraries v22 (compiling with api22).

更改在的build.gradle 的依赖:

compile 'com.android.support:appcompat-v7:22.2.1'

事情是这样的:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion '22.0.1'

    defaultConfig {
        //...
        targetSdkVersion 22
    }

    //...

}

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

这篇关于显示错误,当创建Android Studio中一个新的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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