bberak / react-native-game-engine-handbook

A React Native app showcasing some examples using react-native-game-engine 🐒✨
MIT License
598 stars 85 forks source link

Error when compiling Android: file or directory './android/app/libs', not found #3

Closed almostintuitive closed 6 years ago

almostintuitive commented 6 years ago

Hi,

After installing the libraries and linking with react-native link, we're currently getting this error:

Using incremental javac compilation.
Not using incremental javac compilation.
Using incremental javac compilation.
Not using incremental javac compilation.
Not using incremental javac compilation.
file or directory '/Users/mark/Downloads/react-native-game-engine-handbook-master/android/app/libs', not found
file or directory '/Users/mark/Downloads/react-native-game-engine-handbook-master/android/app/libs', not found
file or directory '/Users/mark/Downloads/react-native-game-engine-handbook-master/android/app/libs', not found
file or directory '/Users/mark/Downloads/react-native-game-engine-handbook-master/android/app/libs', not found
Using incremental javac compilation.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)

* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.

BUILD FAILED

Any advice on how to move forward?

bberak commented 6 years ago

Hiya @itchingpixels, I've left a potential workaround in https://github.com/bberak/react-native-game-engine-handbook/issues/2

That said, I hear your suggestion loud and clear, will work on fix asap, hopefully tonight.

bberak commented 6 years ago

Hi @itchingpixels,

Can you try the suggestion I've left in https://github.com/bberak/react-native-game-engine-handbook/issues/2 and see if that fixes this problem? Let me know how it goes, cheers!

almostintuitive commented 6 years ago

Hi!

I've done another clone and still getting the same error: file or directory '/Users/mark/Downloads/react-native-game-engine-handbook-master/android/app/libs', not found

I have the NDK installed correctly, previously when I didn't I've received a different error.

The thing is that android/app/libs is empty, although there's this line in app/build.gradle:

    compile fileTree(dir: "libs", include: ["*.jar"])

is there any reason why this is needed?

bberak commented 6 years ago

Hi @itchingpixels,

Thanks for giving that a crack. I don't even have the android/app/libs folder on my system - and the app still installs on my sim. Can you try reverting to a commit before the WebGL code (9530cbb) and see if you can install on your Android sim. At this point, we can see if the vanilla app will run on your simulator - before we go down the rabbit hole of checking Gradle versions, Android SDKs and APIs etc..

almostintuitive commented 6 years ago

Yup, thank you, that works! managed to check it out, thanks for the assistance!:)

bberak commented 6 years ago

Don't mention it!