Question

Is it possible to change an Android Project to a Java Project, without losing git history of files ?

Thanks

Note: The current Android project doesn't contain any Android API code and doesn't import any Android package.

Was it helpful?

Solution 2

Close your project and Modify two files

.project

  • Delete any <buildCommand>...<buildCommand/> Android related
  • Delete <nature>com.android.ide.eclipse.adt.AndroidNature</nature>

.classpath

  • Delete any <classpathentry .. /> Android related
  • Add <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>

Finally clean your project from any folder or other things Android related and reopen your project and you should notice that the project is converted to a Java Project

OTHER TIPS

An android project is a Java project. If you are saying that you want to create a copy that you can run locally (essential run the back end)

Create a branch/fork of your current project, delete all the android related code, add a main method that will run the project.

If you are trying to port an android project to a desktop application that is a different issue.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top