如何在Android Studio中更改编译版本? [英] How to change the compile version in Android Studio?

查看:435
本文介绍了如何在Android Studio中更改编译版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我总是使用eclipse构建一个android项目.使用eclipse启动新项目时,可以选择编译版本.但是在Android Studio中,我只能在启动新模块时选择最低版本.我试图更改build.gradle中的compileSdkVersion.但是当我清理项目时,我遇到了很多错误.其中大多数都是类似No resource found that matches 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 ?

推荐答案

  1. 打开您的项目;
  2. 选择菜单项 File-> Project Structure ,然后单击您的模块(例如MyApp),您将在 Properties 标签中找到"Compile Sdk Version".
  3. li>
  1. Open your project;
  2. 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屋!

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