Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem building project with Eclipse #2

Open
keke101 opened this issue Jun 20, 2016 · 2 comments
Open

Problem building project with Eclipse #2

keke101 opened this issue Jun 20, 2016 · 2 comments

Comments

@keke101
Copy link

keke101 commented Jun 20, 2016

Hi,

I'm having problems running Androphsy in Ubuntu 16.04 Eclipse Luna.
I have no problems building the Maven project
[INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Androspy 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.131 s [INFO] Finished at: 2016-06-20T19:26:32+08:00 [INFO] Final Memory: 7M/59M [INFO] ------------------------------------------------------------------------

But when i tried to run the main class, it gives me this error
Error: Could not find or load main class main.java.lk.score.androphsy.main.AndrospyMain

May I know how did you guys build and run this thing in Eclipse? Am I not supposed to import Androphsy as a Maven Project?

@SeeTheC
Copy link

SeeTheC commented Feb 27, 2017

I was having the same issue in Ubuntu 16.04. Below are the steps I did to resolve the error:

  1. Download "Android Development Eclipse" and Install
    http://www.eclipse.org/downloads/packages/release/Neon/2.RC2
  2. After installing open the eclipse. It will download android packages for the first time.
  3. When installation is completed, open the ANDROPHSY project.
  4. Resolve all the Maven packages.
  5. Now run, it will give the error
    Error: Could not find or load main class main.java.lk.score.androphsy.main.AndrospyMain

Problem is in the package name, as package name in all java files are lk.score.androphsy but they are placed in inside the src/main/java/lk/score/androphsy.
So, what I did I moved src/main/java/lk folder to src/lk.
Did the same think for src/test/java/lk/ i.e move the src/lk.

  1. After doing all this. Run the project again. It should run.

@Moneysac90
Copy link

"Resolve all the Maven packages.". Could you please specify what you mean by that?. I tried to build this with "maven install". It says successful but the resulting .jar file seems to be corrupt. When I try to build a java application with eclipse it still says
Error: Could not find or load main class main.java.lk.score.androphsy.main.AndrospyMain

Any chance to get a compiled binary? Because compiling this with eclipse is a nightmare.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants