2

I'm playing about with Android Studio using AndEngine and the Box2D plugin and I can't seem to get it to compile. I've attached a few photos of what I believe to be the relevant settings and messages.

This app / game does compile in Eclipse and I can compile projects in Android Studio WITHOUT dependencies / libraries but including them in my project causes this issue when I come to run it.

Could anyone help?

Image 1

Image 2

Error Message:

    Gradle: 
    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':GTest:compileDebug'.
    > Compilation failed; see the compiler error output for details.

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
trvo
  • 665
  • 1
  • 10
  • 23

1 Answers1

2

Here is the solution:

  1. Clear the cache. File -> Invalidate Cache, then restart your IDE
  2. if that doesnt work, import your project again, so it can get re-indexed.

This post was also helpful.

Community
  • 1
  • 1
  • Thanks - I've actually got this working using another method (sort of). I compiled the libraries in Eclipse to .jar, then added them to the project and also the gradle build file. This compiles successfully but doesn't actually run without errors on the Android device (works fine with eclipse) so I will try your method. – trvo May 23 '13 at 15:39
  • @trvo Did you tried to re-build your proyect? If not, in intellij, `Build -> Rebuild Proyect` – Benjamin Eliezer Jun 26 '13 at 14:08