Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse can't import Phonegap projects
Eclipse can't import Phonegap projects [message #1235800] Sat, 25 January 2014 09:57 Go to next message
Lucas Barton is currently offline Lucas BartonFriend
Messages: 2
Registered: January 2014
Junior Member
I'm trying to get a Phonegap project imported into Eclipse. The problem is, Eclipse does not see the project when I navigate to the project's folder. I've tried doing File > Import > Android > Existing Android Code into Workspace, then I hit Next. After clicking Browse and choosing the project's root directory, nothing shows up in the Projects window. I got the same result from File > New > Project > Android > Android Project from Existing Code.

I'm running Kubuntu 13.10, and Eclipse Kepler Service Release 1. I installed it manually, because the version in the Ubuntu repositories was really old and buggy. It would just crash after being open for a minute or two.

I'm thinking that maybe there's something wrong with my installation of Eclipse, or Phonegap, or both. Some things I've read online have indicated that there might be a missing file in the project. The 5 folders in the root directory are .cordova, merges, platforms, plugins, and www. There is nothing else in the root. The project(s) were created with the "cordova create" command, such as

cordova create foo com.bar.foo foo
Re: Eclipse can't import Phonegap projects [message #1235876 is a reply to message #1235800] Sat, 25 January 2014 15:02 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4435
Registered: July 2009
Senior Member

A PhoneGap project isn't necessarily an Eclipse Workspace project, particularly since the .project file is not present (it is expected when importing Existing projects).

_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Eclipse can't import Phonegap projects [message #1235960 is a reply to message #1235876] Sat, 25 January 2014 20:26 Go to previous messageGo to next message
Lucas Barton is currently offline Lucas BartonFriend
Messages: 2
Registered: January 2014
Junior Member
I thought that only Eclipse projects had .project files? I'm trying to import a Phonegap project into the Eclipse workspace. From what I've been reading, it has to have an AndroidManifest.xml file, which it doesn't. So, I copied a sample manifest from a web page, added it to the root of the project, and then tried again. Now the project shows up in Eclipse, and I can import it into my workspace!

The problem is, if I try to run it, it says there are "errors". (Of course. The manifest is just some random file, and I don't know how to create or edit them.) Isn't Cordova supposed to create an AndroidManifest.xml with the project?
Re: Eclipse can't import Phonegap projects [message #1236008 is a reply to message #1235960] Sun, 26 January 2014 00:07 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 01/25/2014 01:26 PM, Lucas Barton wrote:
> I thought that only Eclipse projects had .project files? I'm trying to
> import a Phonegap project into the Eclipse workspace. From what I've
> been reading, it has to have an AndroidManifest.xml file, which it
> doesn't. So, I copied a sample manifest from a web page, added it to the
> root of the project, and then tried again. Now the project shows up in
> Eclipse, and I can import it into my workspace!
>
> The problem is, if I try to run it, it says there are "errors". (Of
> course. The manifest is just some random file, and I don't know how to
> create or edit them.) Isn't Cordova supposed to create an
> AndroidManifest.xml with the project?

You misunderstood.

Every project that uses the Eclipse IDE is an Eclipse project. Eclipse
projects always have an XML file named .project. This is true for Java
projects, Android projects, etc.

You can only import a "Phonegap" project into Eclipse if it was an
Eclipse project in the first place. Otherwise, you'll have to create a
project and pour the contents of the Phonegap project created with some
other IDE into the new project.

I develop JEE/web software in Java. I have developed Android software.
It looks like Cordova/Phonegap is a way of single-sourcing mobile
applications for more than just Android. I suggest you go to that
community for support in what you're trying to do.

Many communities have chosen to build their technologies atop Eclipse,
but this doesn't make them Eclipse technologies nor can you get support
for them in Eclipse forums. The trick is to find the right community.
Unless I've completely misunderstood your question, I don't think the
support you want is likely to come out of this forum.
Previous Topic:Scrapbook Bug
Next Topic:Auto capitalize type name
Goto Forum:
  


Current Time: Tue Apr 23 08:28:59 GMT 2024

Powered by FUDForum. Page generated in 0.08945 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top