native icon indicating copy to clipboard operation
native copied to clipboard

`jnigen` doesn't generate using JDK version 19.

Open HosseinYousefi opened this issue 3 years ago • 9 comments

          I changed the version of my JDK from 19 to 17 (just like yours) and it finally worked ! Thanks again

_Originally posted by @blackgerman in https://github.com/dart-lang/native/issues/682

HosseinYousefi avatar Feb 03 '23 08:02 HosseinYousefi

We want to get a gradle log here. Maybe we should write stdout and stderr of commands to a temporary log file on failure.

mahesh-hegde avatar Feb 09 '23 17:02 mahesh-hegde

@HosseinYousefi @mahesh-hegde , I use JDK-19 , and it works , are you sure it doesn't work on your device.?

If you use JDK-19 remove the java folder from the Program Files - for Windows and reinstall the JDK again, so you can compile any java file , and run with java command without .java extension file to be put . e.g. : java class_name instead of: java class_name.java

seifibrahim32 avatar Apr 25 '23 23:04 seifibrahim32

If you use JDK-19 remove the java folder from the Program Files ..

We all know how to install java. We are not in stone age to manually add remove folders in windows, we use package managers.

The issue is related to gradle.

mahesh-hegde avatar Apr 26 '23 02:04 mahesh-hegde

If you use JDK-19 remove the java folder from the Program Files ..

We all know how to install java. We are not in stone age to manually add remove folders in windows, we use package managers.

The issue is related to gradle.

😂 , what is the problem of gradle - is the issue related to performance not generation file because while generation process with me it works .

seifibrahim32 avatar Apr 26 '23 02:04 seifibrahim32

But mahesh , when I tried using delete and reinstall the java worked to be honest , i found the same issue and I found on Google search engine these small issues, the only solution I found is this.

And it worked , sometime Java folder at Program Files doesnt remove the old cached folders when someome upgrades the version , the test was on Windows.

seifibrahim32 avatar Apr 26 '23 02:04 seifibrahim32

Do you mean the gradle examples worked?

mahesh-hegde avatar Apr 26 '23 13:04 mahesh-hegde

Do you mean the gradle examples worked?

Fortunately it worked, I may assist you into that maybe through meeting

seifibrahim32 avatar Apr 26 '23 22:04 seifibrahim32

Good to hear. However the person in linked issue had a problem. It would be good to find out what it was.

I and Hossein are working on different issues, so haven't got the time to check this yet.

mahesh-hegde avatar Apr 27 '23 01:04 mahesh-hegde

The point is gradle version which supports JDK 19 is 7.6.0+, so maybe Android Studio he has it doesnt support , so he should either change distributionUrl to 7.6 gradle and synchronize it using Sync Now or Find Android Studio Flamingo , i think they added maximum JDK 19 support default while searching on Medium articles.

Also, Project Settings on Android Studio allows you to install Gradle 7.6 without distributionUrl itself .

seifibrahim32 avatar Apr 27 '23 03:04 seifibrahim32