I try to add connectivity to my Flutter project, my main goal is to support Android first. When I add ssh2 package I get error. Steps I follow:
flutter pub add ssh2
for which output is:Changed 3 dependencies!
flutter pub get
- Push 'play' button the output is:
FAILURE: Build failed with an exception Execution failed for task ':ssh2:compileDebugJavaWithJavac'. Could not resolve all files for configuration ':ssh2:debugCompileClasspath'. Failed to transform bcprov-jdk15on-1.69.jar (org.bouncycastle:bcprov-jdk15on:1.69) to match attributes {artifactType=android-classes-jar, org.gradle.category=library, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-api}. Execution failed for JetifyTransform: C:\Users\mkaczmarczyk.gradle\caches\modules-2\files-2.1\org.bouncycastle\bcprov-jdk15on\1.69\91e1628251cf3ca90093ce9d0fe67e5b7dab3850\bcprov-jdk15on-1.69.jar. Failed to transform 'C:\Users\mkaczmarczyk.gradle\caches\modules-2\files-2.1\org.bouncycastle\bcprov-jdk15on\1.69\91e1628251cf3ca90093ce9d0fe67e5b7dab3850\bcprov-jdk15on-1.69.jar' using Jetifier. Reason: IllegalArgumentException, message: Unsupported class file major version 59. (Run with --stacktrace for more details.)
I tried everything proposed in https://www.geeksforgeeks.org/fix-execution-failed-for-task-appcompiledebugjavawithjavac-in-android-studio/ as well as "Invalidate Caches/ Restart" and similar.
When I try to run example from package's author I do it successfully up to version 1.6. With higher releases I get the same error.