Convert java project into android project on Eclipse [duplicate]

匿名 (未验证) 提交于 2019-12-03 01:59:02

问题:

This question already has an answer here:

I have seen a question about converting android to java project. Now I want to know about Converting Java project into Android Project. Is there any way? Thanks

回答1:

First Way

  1. Install ADT plugin
  2. Right click on java project
  3. Select Android > Convert to Android project.
  4. Supply /res folder, /AndroidManifest.xml and /default.properties if needed.

Second Way: UPD

Actually, the "First Way" doesn't work with latest ADT plugin versions, for some reason google has removed the convert command. Another way would be:

  1. Check in your java project into a VCS (svn or git or whatever)
  2. Delete it from workspace
  3. Import the project from VCS
  4. On import, select Create New Project -> Android

Third Way

Why not just copy sources to a newly created Android project :) ?

Fourth Way: UDP :)

  1. Remove the java project from workspace
  2. Start create new Android project wizard
  3. Select create from existing source option and point to your java project folder.


回答2:

Check this,

http://developer.android.com/guide/developing/projects/projects-eclipse.html

Convert existing project into Android project in Eclipse?



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!