Sunday 30 October 2016

Gradle cannot find the Android Support Repository - Eclipse Neon, Gradle 3.5, javafxports

This is my first post. I have searched extensively for four days through Stackoverflow and other sources for the problem and have yet to find a solution. This one really has me racking my brain.



Using Eclipse NEON, Gradle 3.5, JavaFXPorts 1.3.5, latest Android SDK



Developing on Windows 10 x64



All expected Gradle tasks are not showing for simple, one-class "Hello World" project. (eg. android, androidRelease, androidInstall, etc. tasks all missing).



From command line, I can run gradlew android and I get an error that Android Support Repository cannot be found.




AFAIK android SDK path is set properly and the Android Support Repository is installed.



Note that that "gradlew run" does build and execute the Desktop version of the project properly.



Below are key config files and outputs. I can post anything else as requested.



========



gradle.build:




buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.5'
}
}


apply plugin: 'org.javafxports.jfxmobile'

repositories {
jcenter()
}


dependencies {
implementation 'com.google.guava:guava:21.0'
}


jfxmobile {
android {
compileSdkVersion = 25
targetSdkVersion = 19
minSdkVersion = 17
}
}

mainClassName = 'Main'



=======



gradle.properties:



org.gradle.jvmargs=-Xms128m -Xmx1g
ANDROID_HOME=c/:androidSDK



=======



SDK Manager --list (shows repository installed):



C:\androidSDK\tools\bin>sdkmanager.bat --list
Warning: File C:\Users\Kent\.android\repositories.cfg could not be loaded.
Installed packages:
Path | Version | Description | Location
------- | ------- | ------- | -------
build-tools;25.0.3 | 25.0.3 | Android SDK Build-Tools 25.0.3 | build-tools\25.0.3\

emulator | 26.0.0 | Android Emulator | emulator\
extras;android;m2repository | 47.0.0 | Android Support Repository | extras\android\m2repository\
extras;intel;Ha...ecution_Manager | 6.0.6 | Intel x86 Emulator Accelerator... | extras\intel\Ha...cution_Manager\
patcher;v4 | 1 | SDK Patch Applier v4 | patcher\v4\
platform-tools | 25.0.5 | Android SDK Platform-Tools | platform-tools\
platforms;android-25 | 3 | Android SDK Platform 25 | platforms\android-25\
sources;android-25 | 1 | Sources for Android 25 | sources\android-25\
tools | 26.0.2 | Android SDK Tools | tools\



=======



gradlew android output:



C:\Users\Kent\workspace\TestJavaFXPorts3>gradlew android
Starting a Gradle Daemon (subsequent builds will be faster)

FAILURE: Build failed with an exception.

* What went wrong:

You must install the Android Support Repository. Open the Android SDK Manager and choose the Android Support Repository from the Extras category at the bottom of the list of packages.

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

BUILD FAILED

Total time: 7.627 secs



=======



Android SDK directory:



C:\androidSDK>dir
Volume in drive C is Acer
Volume Serial Number is C492-4415

Directory of C:\androidSDK


2017-05-06 08:55 PM
.
2017-05-06 08:55 PM
..
2017-05-08 06:27 PM 16 .knownPackages
2017-05-06 08:54 PM
build-tools
2017-05-06 08:42 PM
emulator
2017-05-08 06:27 PM
extras
2017-05-06 08:47 PM
licenses
2017-05-06 08:42 PM
patcher
2017-05-06 08:42 PM
platform-tools
2017-05-06 08:56 PM platforms

2017-05-06 08:49 PM sources
2017-05-06 08:43 PM tools

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...