从日食导入到Android工作室? [英] Importing from eclipse to android studio?

查看:156
本文介绍了从日食导入到Android工作室?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想从Eclipse中导入部分项目到Android工作室,我已经使用导出到哪儿它作为一个.gradle文件,并在Studio中打开它的选项。
但我也试过,我创造Studio和新项目的副本main_activity.java和res文件夹中的重要文件的方法。
但后来当我打开main_activity.java,它立刻给了我一个错误。 无法解析 - [R 我已经寻找一个答案,有人想出了添加进口android.R; 进口com.example.package; 第一个作品为R的问题,但随后给了我在它说的setContentView无法解析错误。第二行没有做任何事情。

I wanted to import some projects from Eclipse to Android Studio, I've already used the option where you export it as a .gradle file and open it in the Studio. But I also tried a method where I create a new project in Studio and the copy the main_activity.java and the important files in the res folder. But then when I open the main_activity.java, it immediatly gives me an error. Could not resolve R I've already searched for an answer and somebody came up with adding import android.R; or import com.example.package; the first one works for the 'R' issue but then Gives me an error in which it says that setContentView cannot be resolved. And the second line doesn't do anything.

推荐答案

我面临着的问题太多,
做下面的事情,

I faced that problem too, Do the following things,


  1. 请更新您的ADT为R22,

  2. 让R22的更新的ADT,

  3. 从文件,关闭项目关闭项目

  4. 从Studio退出,

  5. 启动工作室再次,

  6. 从这些显示在首页的左侧面板最近的项目选择项目

这篇关于从日食导入到Android工作室?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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