No projects found to import

只愿长相守 提交于 2019-12-24 01:28:29

问题


I was looking for an ePub reader in android.
I referred PageTurner. Got it's apk downloaded and it worked.

But when I downloaded it's source code from github (as it's open source) and tried to Import the project, it gives the message that No Projects found to import even though it's pointing to the correct location.

I searched for similar questions on SO, but didn't got any help.
I guess I'm missing out libraries and some other stuff that will make this work. Note that bin and gen folders are missing at github link.
I'm using Eclipse Indigo as IDE.

Any idea what's wrong here? Any help appreciated.

EDIT

1.) From suggestions, I created new project and imported it from existing source but it's giving errors at virtually every line of code.

Some of the errors are like :

Package x1 does not match with package x2
class RoboActivity not found
method not found
@Inject cannot be resolved to a type

2.) What exactly do I download from Maven site?

Which libraries are required from these.

Moreover, When I tried to install the plugin from instructions, I got

3.) this link is available for Maven Plugin but I can't find the plugin here :(


回答1:


Big update: I hadn't realized that the new ADT likes Maven even less than the old one.

Let me chime in here as the author of PageTurner: personally I don't use the Eclipse Maven plugin, but I simply generate an Eclipse project with mvn eclipse:eclipse.

If you have never worked with Maven, it's a command-line build tool similar to Ant (or Unix make). You can download Maven 3 here: http://maven.apache.org/download.html

Once you have Maven installed, the steps to import PageTurner into your Eclipse environment are:

  1. Download and unpack the sources
  2. Run

    mvn -Djavax.net.ssl.trustStore=trust.jks -Djavax.net.ssl.trustStorePassword=pageturner -DexcludeTransitive=true dependency:copy-dependencies

    inside the source folder

  3. Create a libs folder

  4. Copy everything in target/dependency to the libs folder
  5. In Eclipse, select "New Android Project" -> "From existing source" and point it to the folder you unpacked PageTurner in.

Essentially this completely leaves Maven out of the game, except to get the dependencies.




回答2:


Your project is maven project. Download maven plugins for eclipse then import existing project as Existing Maven Projects. Dependencies of other jar will automatically resolved if your pom.xml file is correct.

Maven Eclipse Plugin

Maven 2 Eclipse Plug-in




回答3:


instead of importing try

create new project using existing source

Hope this helps




回答4:


if bin and gen folders are missing no matter you can also create your own project and just copy the res,src and manifeast files from that source to your project. then just refresh your project then clean it an build it will work.




回答5:


This is maven based android project. So you need to download all the dependencies first, then import the project.

Read this carefully.



来源:https://stackoverflow.com/questions/10257036/no-projects-found-to-import

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