Search code examples
javaandroidpackageandenginemissing-features

AndEngine missing exception package


To start off, I decided to start using AndEngine after making a few games using the default Android SurfaceView class, so I searched on Google on how to install AndEngine and I found a tutorial saying to create a project then import the AndEngine project + gradle settings and I did all of that stuff. Next, after gradle finished compiling it starting complaining. Basically the errors say about 2 missing packages: org.andengine.exception and org.andengine.system.

Here's a screenshot of the project view (link): image-missing-packages

Any ideas? Thanks!


Solution

  • The problem is caused by a bug (which should be fixed later) in the IntelliJ IDEA (Android Studio is IntelliJ + Android SDK bundled together). The problem is caused by the importing system, which gives a warning about the path it if contains a space:

    "C://Users/Username/A Folder/YourProjectFolder"
                         ^
    

    The warning says that importing may not copy some files if the file path contains a space. To fix this, remove the imported project from the modules list, then delete it from the disk. Next, if you use Gradle also remove it manually from settings.gradle. Then move your project to another location (or rename the folder(s) by replacing " " with "-" or "_" eg. "A folder" to "A_folder") which has no spaces and start Android Studio, select Open existing project and browse to project's location.Finally re-import your project and it should have all files.

    Source: import-summary.txt after importing the project in a location with a space in its path.