Gradle/Java issues building for Android

I’m trying to test a project on an Android device. It seems to build everything correctly, but then chokes on Link:

The problem seems to be the gradle version. I’ve tried setting the android gradle-version in project.xml to several different versions, all of them failing in one way or another. Versions and errors are as follows:

Gradle 2.10 (default) and 3.5.1:

Could not determine java version from ‘15.0.1’.

(This seems to be an error with newer versions of Java changing their version name convention.)

Gradle 4.10.3

A problem occurred evaluating project ‘:app’.
Failed to apply plugin [id ‘’]
Gradle version 2.10 is required. Current version is 4.10.3. If using the gradle wrapper, try editing the distributionUrl in /Users/patrick/.gradle/daemon/4.10.3/gradle/wrapper/ to

(Is 2.10 required?)

Gradle 5.6.3:

Could not initialize class org.codehaus.groovy.runtime.InvokerHelper

Gradle 6.9.2

A problem occurred evaluating root project ‘bin’.
Cannot add task ‘wrapper’ as a task with that name already exists.

Gradle 7.3.3:

“A problem occurred configuring root project ‘bin’.”
Could not resolve all dependencies for configuration ‘:classpath’.
Using insecure protocols with repositories, without explicit opt-in, is unsupported. Switch Maven repository ‘BintrayJCenter(’ to redirect to a secure protocol (like HTTPS) or allow insecure protocols. See for more details.

I’m running Java 15.0.1 and lime 7.2.1. For the Android NDK I’m using r21e. I cannot upgrade lime on this project for various reasons. I could downgrade Java but I’m reluctant to if there’s a better solution. Is there some version of gradle (or combination w/ Java) that is working for people?

---- UPDATE -----

I switched to Gradle 2.10 + JDK 1.8 + Android SDK 26 and got further. Now the compilation halts at:

/MyDir/Export/android/bin/app/src/main/java/org/libsdl/app/ error: cannot find symbol
  symbol:   method loadLibrary(String)
  location: class SDL
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'. 

Any thoughts on what’s going wrong here?

---- UPDATE 2 -----

So, I rebuilt the project from scratch, and now—for reasons that are unclear to me, as my project.xml is identical—it seems to be working correctly, although it gives the complaint: “This build could be faster, please consider using the Gradle Daemon:”.

Weird. But at least it compiles and deploys.