sm64-port-android-base
sm64-port-android-base copied to clipboard
Cannot build Android app - gradle fails on all platforms
I consistently get errors when trying to run gradlew on Windows and Linux. Native builds work fine on both platforms. This has happened on Windows 10, Ubuntu 18.04, Ubuntu 20.04 and Manjaro.
Here's the error message I receive:
> Configure project :app
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/adam/Android/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':app'.
> java.lang.NullPointerException (no error message)
I've followed the guide and installed all the necessary dependencies and I have the following SDK components installed:
- build-tools;28.0.2
- cmake;3.10.2.4988404
- emulator
- ndk-bundle
- ndk;22.0.7026061
- patcher;v4
- platform-tools
- platforms;android-26
I don't get any errors relating to missing tools or licenses as I have done previously, so this shouldn't be an issue. However, I've included this list in case it gives you any clues as to what's happening.
EDIT: I also receive the same error when building using the docker file on Ubuntu 18.04 so I don't think it's anything to do with my configuration. Output of the attempt using docker with "./gradlew assembleDebug --stacktrace" is below SM64 Android port gradle build failure on docker with stacktrace.txt
Same issue as OP, using Arch Linux. Please get back to us with any information regarding how to build.
Same here. It's really damning that all other platforms, such as the 3DS, DSi, Wii U, Wii, PSP, PS Vita, etc all work, but this is consistently failing. Not just that, but macOS and Raspberry Pi OS (Debian-based) also worked once I figured out what to do.
While the macOS and Raspi ports have improved, the Android port did the exact reverse (it was actually Google's fault, as they spent the whole year trying to change the political landscape in America rather than make working software).
The new commits in master (e5b017dd3421cb2646f853e579c23e4f847389e7 specifically) should fix this. Please try it!