在缺少build.gradle的情况下将Eclipse迁移到Android Studio [英] Migrating Eclipse to Android Studio with missing build.gradle
问题描述
正如许多人所建议的那样,我正在尝试从eclipse切换到Android Studio.遵循 https://developer.android.com/sdk/installing/migrate.html中的建议我直接导入了Eclipse工作区,而没有从Eclipse生成gradle文件.但是,导入后,我的项目都没有一个build.gradle文件,可以在其中添加类路径和内容.
As advised by many, I am trying to make the switch from eclipse to Android Studio. Following the advise in https://developer.android.com/sdk/installing/migrate.html I imported the eclipse workspace directly without generating the gradle files from Eclipse. However after importing, none of my projects have a build.gradle file where I can add a classpath and stuff.
请告知,有什么方法可以生成build.gradle文件吗?
Please advise, is there a way to generate the build.gradle file or something?
谢谢.
推荐答案
Have you read this? Looks like you didn't get the special import wizard flow. At least for me this was the case.
The root directory of the project you import must have an AndroidManifest.xml file.
Either:
The root directory must contain the .project and .classpath files from Eclipse
or
The root directoy must contain res and src directories.
这篇关于在缺少build.gradle的情况下将Eclipse迁移到Android Studio的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!