如何在 Android Studio 中更改编译版本? [英] How to change the compile version in Android Studio?
问题描述
我总是使用 eclipse 来构建一个 android 项目.当我使用eclipse启动一个新项目时,我可以选择编译版本.但是在 Android Studio 中,我只能在启动新模块时选择最小版本.我试图更改 build.gradle
中的 compileSdkVersion
.但是当我清理项目时,我遇到了很多错误.大多数错误类似于 No resource found that match the given name ....
I always use eclipse to build an android project. When I use the eclipse to start a new project, I can choose the compile version. But in Android Studio, I can only choose the min version when I start a new module. I tried to change the compileSdkVersion
in build.gradle
. But when I clean the project ,I got a lot of errors.Most of them are something like No resource found that matches the given name ....
这是我的 build.gradle
Here is my build.gradle
compileSdkVersion 16
buildToolsVersion "23.0.1"`
所以我的问题是:如何在第一次启动新模块时分配编译版本,就像我在 eclipse 中经常做的那样?
So my question is :How can I assign the compile version when I start the new module at the first time just like what I always do in the eclipse ?
推荐答案
- 打开你的项目;
- 选择菜单项File->Project Structure,然后单击您的模块(如MyApp),您将在属性选项卡中找到编译Sdk版本".莉>
- Open your project;
- Choose menu item File->Project Structure, and click your modules (like MyApp), and you will find "Compile Sdk Version" in Properties tab.
这篇关于如何在 Android Studio 中更改编译版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!