Could not resolve all dependencies for configurati

2020-02-15 02:58发布

问题:

After Run /gradle Android to deploy the Gluon app in my Android Phone. I have this error:

org/controlsfx/control/spreadsheet/SpreadsheetColumn$$Lambda$1
Saving lambda class: org/controlsfx/control/textfield/TextFields$$Lambda$1
:mergeClassesIntoJar
FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture snapshot of input files for task 'mergeClassesIntoJar' during up-to-date check.
> java.io.FileNotFoundException: /Users/yotti/Library/Android/sdk/extras/android/support/multidex/library/libs/android-support-multidex.jar (No such file or directory)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

After update the JFXPlugin like in the Image ,i have this error

A problem occurred configuring root project 'SingleViewProject'.

Could not resolve all dependencies for configuration ':androidRuntimeNoRetrolambdaCopy'. Could not find com.android.support:multidex:1.0.1. Searched in the following locations: https://jcenter.bintray.com/com/android/support/multidex/1.0.1/multidex-1.0.1.pom https://jcenter.bintray.com/com/android/support/multidex/1.0.1/multidex-1.0.1.jar https://oss.sonatype.org/content/repositories/snapshots/com/android/support/multidex/1.0.1/multidex-1.0.1.pom https://oss.sonatype.org/content/repositories/snapshots/com/android/support/multidex/1.0.1/multidex-1.0.1.jar Required by: :SingleViewProject:unspecified

回答1:

It was already mentioned in this question, Android obsolete library Android Support Library is no longer available.

Using jfxmobile plugin version 1.3.1 solves the issue, as it uses the multidex library that should be found here: ANDROID_HOME/extras/android/m2repository/com/android/support/multidex/1.0.1/multidex-1.0.1.aar.

Note you need to install with the Android SDK Manager both Extras/Google Repository and Extras/Android Support Repository.

Also is advisable to create a properties file with the ANDROID_HOME variable, under /Users/<user>/.gradle/gradle.properties:

ANDROID_HOME=/Users/yotti/Library/Android/sdk

and remove the line in the build.gradle -> jfxmobile -> android -> androidSdk.

As for the Charm dependencies you are using the wrong repository, you need:

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

Finally, you don't show a ControlsFX dependency, so it is not possible to have the exception posted in the first place.