Android Studio Custom Plugin Example - APK not building succesfully

242 views
Skip to first unread message

Peter Cassell

unread,
Mar 13, 2024, 9:06:41 AM3/13/24
to DroidScript
I am starting out with DroidScript plugins and attempting to create a basic plugin from the example code on the Github

I have forked and cloned this repository, opened the project in Android Studio and then attempted to build the APK.

There is one error with this build that I haven't yet been able to work out and I was hoping for some assistance here.

I get the following error:

"Execution failed for task ':app:processDebugMainManifest'.
> Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not "opens java.io" to unnamed module @3fc21b97"

This appears to be an issue with accessing the java.ioFile.path field "reflectively". Apparently newer versions of Java have tighter restrictions on what can be accessed this way.

Has anyone encountered this issue with this repository? Or does anyone have a working repo for building Java DroidScript plugins in Android studio?
 
Otherwise, I would welcome any advice on how to debug this issue since I think the offending code is in a dependency.

Thanks

Dave

unread,
Mar 15, 2024, 5:46:05 AM3/15/24
to DroidScript
Hi,

Did Android Studio ask you to upgrade the Gradle Plugin when you first ran and did you do that?

After doing that, did you switch to using JDK 11 in your project settings?

What version of Android Studio are you using?




Reply all
Reply to author
Forward
0 new messages