如何使用新的android stduio构建旧的android studio项目? [英] How for old android studio project build with new android stduio?

查看:314
本文介绍了如何使用新的android stduio构建旧的android studio项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

erorr gradle and error gradle

当我下载 a 旧github项目,用于构建新版本android studio和新版本gradle 错误和错误。

我怎么能用gradle新版本构建android项目?

i我很困惑,什么是谈论gradle要好得多蚂蚁在日食?

请给我一个很好的解决方案



我尝试了什么:



i测试了一些解决方案,但它们不是一般的方式。

erorr gradle and error gradle
when i downloaded a old github project,for building in new version android studio and new version gradle error and errors.
really how can i build android project with gradle new version?
i am confused,what is talked gradle is much better ant in eclipse?
please give me a good solution

What I have tried:

i tested some solution but they aren't general way.

推荐答案

:)嗨这样做:我们应该设置某些属性为true:

更改set buildToolsVersion

:) hi for doing this:we should set some property true:
change set buildToolsVersion
Look in the SDK Manager what is your highest Android SDK Build-tools version, and copy this version number in your project build.gradle file, in the android/buildToolsVersion property (for me, version was "18.1.1").



更改gradle版本:




change gradle version:

Open up this file in your project:

<project>/gradle/wrapper/gradle-wrapper.properties

Edit the distributionUrl line and set it too:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-all.zip

Rebuild your project.

</project>







dependencies {
        classpath 'com.android.tools.build:gradle:1.3.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }



如何查看android插件版本和gradle版本


how to see android plugin version and gradle version

File->Project Structure->Project pane->"Android plugin version".

Make sure you don't confuse the Gradle version with the Android plugin version. The former is the build system itself, the latter is the plugin to the build system that knows how to build Android projects

-----------
But when using the gradle plugin 0.7.+, Android Studio needs Gradle 1.8. So, you have to update Gradle from 1.7 to 1.8. This was done by going to Tools -> Android -> Sync Project with Gradle Files It forces Android Studio to give out Error message you see on http://tools.android.com/recent



之后我建立了这个网站项目成功。

见图像查看快照页面

感谢关注


after it i build a this site project successfully.
see image see snapshot ptoject
thanks for attention


对不起,我试着提问。


这篇关于如何使用新的android stduio构建旧的android studio项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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