1

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    <DIR>          .
2017-05-06  08:55 PM    <DIR>          ..
2017-05-08  06:27 PM                16 .knownPackages
2017-05-06  08:54 PM    <DIR>          build-tools
2017-05-06  08:42 PM    <DIR>          emulator
2017-05-08  06:27 PM    <DIR>          extras
2017-05-06  08:47 PM    <DIR>          licenses
2017-05-06  08:42 PM    <DIR>          patcher
2017-05-06  08:42 PM    <DIR>          platform-tools
2017-05-06  08:56 PM    <DIR>          platforms
2017-05-06  08:49 PM    <DIR>          sources
2017-05-06  08:43 PM    <DIR>          tools
  • See this [answer](http://stackoverflow.com/a/42143741/3956070) for the Android Support Repository and this [one](http://stackoverflow.com/a/40358734/3956070) for showing the gradle tasks on Eclipse. – José Pereda May 08 '17 at 18:13
  • Thank you Jose. Although I have done much research here and tried many things, I have not come across the first post regarding multidex-*.aar. I will try this. I'm less concerned with them showing up in Eclipse - I don't mind running builds from the command line if I can get everything else working. Thanks! – Kent Dawson May 08 '17 at 20:01
  • As promised, I and posting the other files, just in case it helps someone, or there is another problem with my config that someone may notice – Kent Dawson May 08 '17 at 20:02
  • Well the post by @JoséPereda for showing all of the tasks worked and I can now see them in Eclipse - thank you for that! However, the first post about gradle and the android repository did not work. The repository is installed and the multidex-1.0.1.aar file is in the expected location. I also installed the Google repository, as expected and made sure that all authenticated users have rwx on the androidSdk folder and all contents below. Still getting the error above: "You must install the Android Support Repository..." – Kent Dawson May 08 '17 at 21:36
  • Are you removing the `androidSdk` config from the build.gradle file in favor of the `ANDROID_HOME` property in the gradle.properties file (my last point at the referred post)? – José Pereda May 08 '17 at 21:43
  • I did, in fact - I should update my build.gradle file in my question. I'll do that now... I also closed/reopened the project and refreshed the gradle project. This is really weird - I think I will completely reinstall the SDK - something must be corrupted... – Kent Dawson May 08 '17 at 21:51
  • `ANDROID_HOME=c/:androidSDK` ... That's a typo, isn't it? – José Pereda May 08 '17 at 21:53
  • I don't think so - my sdk is right in the root of the c: drive. I just posted the DIR listing of it in the question for you to look at... Did I do something stupid with the SDK? – Kent Dawson May 08 '17 at 21:57
  • I mean `ANDROID_HOME=c/:androidSDK` should be `c:/androidSDK` – José Pereda May 08 '17 at 21:59
  • That was it, my friend! I don't know why I thought the 'ANDROID_HOME=' was supposed to be there, but I can now see all of the tasks and build an apk. Thank you so much! – Kent Dawson May 09 '17 at 01:01
  • I could have looked right at that typo for hours and not seen it - in fact that's exactly what I did. Thank again, – Kent Dawson May 11 '17 at 13:10

1 Answers1

1

@JoséPereda solved my issues in the following comment:

I mean ANDROID_HOME=c/:androidSDK should be c:/androidSDK – José Pereda