I am using libgdx pay for Android and iOS, and was until recently able to test my application in desktop mode.
Since upgrading to IntelliJ 2016.1, I now receive the following error only when trying to run the desktop application; both iOS and Android continue to compile and run successfully.
The error:
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoClassDefFoundError: com/badlogic/gdx/pay/PurchaseObserver
My build.gradle file for the desktop and core modules looks as below;
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = '####'
gdxVersion = '1.9.2'
roboVMVersion = '1.8.0'
box2DLightsVersion = '1.4'
ashleyVersion = '1.4.0'
aiVersion = '1.5.0'
gdxpayVersion = '0.6.0'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "de.tomgrill.gdxtwitter:gdx-twitter-core:0.1.0-SNAPSHOT"
compile "com.badlogicgames.gdxpay:gdx-pay:$gdxpayVersion"
compile "com.badlogicgames.gdxpay:gdx-pay-client:$gdxpayVersion"
}
}
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "de.tomgrill.gdxtwitter:gdx-twitter-desktop:0.1.0-SNAPSHOT"
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
}
}
Furthermore, within IntelliJ it reports no error in being able to import the PurchaseObserver, it only occurs when I try to run the application.
Any help would be appreciated.
This is a known bug of IntelliJ itself, which is summarised here http://www.badlogicgames.com/forum/viewtopic.php?f=11&t=21148&hilit=intellij
The bug IntelliJ issue can be found here
https://youtrack.jetbrains.com/issue/IDEA-147788
The bug only occurs when there is also an Android run configuration.
Until it is fixed a workaround is to use gradle via the command line, as below;
gradle ProjectName:desktop run
This can also be implemented as a run configuration in IntelliJ.
Related
I have a relatively straightforward modular project, and I've already set all of the options that I've found in the documentation as well as in different answers or articles such as How to force gradle to add dependencies to the module path instead of the class path in eclipse? and others.
I'm getting a module not found exception:
java.lang.module.FindException: Module gdx.backend.lwjgl not found, required by com.myproject.client
I only get this exception when running my application through gradle's application:run task. When I run it in IntelliJ or using the runtime image generated by the Badass JLink plugin, everything runs fine. After hours of debugging and building command lines by hand I was able to figure out that the difference between a correctly started program and what gradle does, is that everything else starts the program using the --module-path option while Gradle INSISTS on producing the following command line, no matter what I do in my build.gradle files:
Starting process 'command 'C:\Tools\java\bin\java.exe''. Working directory: C:\repos\pv-core\master\pv-client Command: C:\Tools\java\bin\java.exe -Dfile.encoding=windows-1252 -Duser.country=FR -Duser.language=fr -Duser.variant -cp C:\Users\accou\.gradle\caches\modules-2\files-2.1\com.badlogicgames.gdx\gdx-backend-lwjgl\1.9.11\3c094feb74e2aef14e30e988326612ee75387c8f\gdx-backend-lwjgl-1.9.11.jar;[...] --module com.myproject.client/com.myproject.client.ClientStarter
Successfully started process 'command 'C:\Tools\java\bin\java.exe''
Error occurred during initialization of boot layer
java.lang.module.FindException: Module gdx not found, required by com.myproject.client
My gradle files contain the following:
Root file:
subprojects {
apply plugin: "java"
java {
modularity.inferModulePath = true
}
targetCompatibility = '11'
sourceCompatibility = '11'
repositories {
mavenLocal()
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
google()
}
test {
useJUnitPlatform()
testLogging {
events 'PASSED', 'FAILED', 'SKIPPED'
}
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.3.1'
testImplementation 'org.junit.jupiter:junit-jupiter-params:5.3.1'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.3.1'
}
version = '0.0.1'
ext {
appName = 'MyProject'
gdxVersion = '1.9.11'
box2DLightsVersion = '1.4'
aiVersion = '1.8.0'
artemisVersion = '2.3.0'
junitVersion = '5.4.2'
slf4jVersion = '1.8.0-beta2'
}
}
project(':pv-core') {
dependencies {
}
}
Client project (application):
plugins {
id 'org.beryx.jlink' version '2.22.3'
id 'application'
}
jlink {
options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
launcher{
name = 'hello'
jvmArgs = ['-Dlog4j.configurationFile=./log4j2.xml']
}
}
ext.moduleName = 'com.myproject.client'
group = 'com.myproject.client'
//mainClassName = 'com.myproject.client.PVClientStarter'
application {
mainModule = 'com.myproject.client'
mainClass = 'com.myproject.client.ClientStarter'
}
apply plugin: 'java-library'
dependencies {
api "com.badlogicgames.gdx:gdx:$gdxVersion"
api "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
api "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
api "com.esotericsoftware.spine:spine-libgdx:3.6.53.1"
api "com.underwaterapps.overlap2druntime:overlap2d-runtime-libgdx:0.1.0"
api "com.kotcrab.vis:vis-ui:1.3.0"
api "net.dermetfan.libgdx-utils:libgdx-utils:0.13.4"
//api "de.tomgrill.gdxfacebook:gdx-facebook-core:1.4.1"
//api "de.tomgrill.gdxdialogs:gdx-dialogs-core:1.2.5"
api "com.github.czyzby:gdx-kiwi:1.9.1.9.6"
api "com.github.czyzby:gdx-lml:1.9.1.9.6"
api "com.github.czyzby:gdx-lml-vis:1.9.1.9.6"
api "de.golfgl.gdxgamesvcs:gdx-gamesvcs-core:1.0.2"
compile "com.badlogicgames.gdx:gdx-ai:$aiVersion"
compile "com.badlogicgames.gdx:gdx-controllers:$gdxVersion"
//compile "com.esotericsoftware:kryo:5.0.0"
compile "kryonet:kryonet:2.21"
testCompile 'org.testng:testng:7.3.0'
}
test {
useTestNG()
//testLogging.showStandardStreams = true
testLogging {
events "passed", "skipped", "failed"
}
}
compileJava {
inputs.property("moduleName", moduleName)
doFirst {
options.compilerArgs += [
'--module-path', classpath.asPath
]
classpath = files()
}
}
Any idea as to how I can possibly (FINALLY) tell gradle to go with --module-path rather than -cp ?!
I think I just figured it out randomly. I kept messing with the gradle files and eventually removed the java blocks containing the statements modularity.inferModulePath = true (despite this being the main advice given in the gradle docs....!), moved up the compileJava block above dependencies and the jlink plugin configuration and it ended up working somehow.
Lots of black magic involved in all this stuff, is the feeling I'm left with after a couple of days of fighting vs modules & gradle tbh..
EDIT: actually I didn't address the root cause of the problem, gradle is still using -cp over --module-path, but the changes I just described above here eventually lead to the gradle successfully launching my application, yet STILL with the -cp option. So I'm still very much interested in having gradle do a proper, JPMS-compliant, module launch (instead of a classpath launch).
The model Gradle introduced for dealing with modules in Java is based on inferring whether or not the current project code is a module or not.
This means that your application needs to have either a module-info or a Automatic-Module-Name entry in its manifest.
Further details in the documentation.
I am using OpenSSL for my Java GRPC project which uses gradle.
I read the documetation which mentions that we should make security settings as mentioned in this link.
I have included the osdetector plugin in the build.gradle file.
But when I build the project, gradle is not able to resolve the osdetector plugin and throwing error
> Failed to apply plugin [id 'com.google.protobuf']
> Plugin with id 'osdetector' not found.
My gradle file is as follows:
def neo4jVersion = "2.3.3"
apply plugin: 'application'
apply plugin: 'java'
apply plugin: 'com.google.protobuf'
apply plugin: 'idea'
apply plugin: 'com.google.osdetector'
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.3'
classpath 'com.google.gradle:osdetector-gradle-plugin:1.4.0'
}
}
protobuf {
protoc {
// The version of protoc must match protobuf-java. If you don't depend on
// protobuf-java directly, you will be transitively depending on the
// protobuf-java version that grpc depends on.
artifact = "com.google.protobuf:protoc:3.0.0-beta-2"
}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:0.12.0'
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
generatedFilesBaseDir = "$projectDir/src/generated"
}
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
compile 'io.grpc:grpc-all:0.12.0'
compile "org.neo4j:neo4j:${neo4jVersion}"
compile "org.neo4j:neo4j-ogm-core:2.0.1"
compile "org.neo4j:neo4j-ogm-http-driver:2.0.1"
compile 'com.google.apis:google-api-services-storage:v1-rev71-1.22.0'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.3'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.3'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.3'
compile 'io.netty:netty-tcnative-boringssl-static:1.1.33.Fork14:' + osdetector.classifier
}
The compile dependency alone is getting resolved however.
I think I am missing something basic here. Please let me know the solution.
Updated
protobuf-gradle-plugin is not compatible with osdetector-gradle-plugin-1.4.0, since that version changed the name of the plugin. Swapping to version osdetector 1.2.1 should fix the problem.
How to control H2 driver version in Grails/Gradle project?
Having problems with running Grails 3 app with H2 I found this answer: Grails accessing H2 TCP server hangs stating it may be caused by driver version difference.
My IDE reports Grails app uses 1.3.176 version of H2, while my server has 1.4.190. So, I would like to upgrade app's H2, but can't find where it is defined. I sought all project files and found no version definition.
UPDATE
My current build.gradle:
buildscript {
ext {
grailsVersion = project.grailsVersion
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencies {
classpath "org.grails:grails-gradle-plugin:$grailsVersion"
classpath 'com.bertramlabs.plugins:asset-pipeline-gradle:2.5.0'
classpath "org.grails.plugins:hibernate:4.3.10.5"
}
}
plugins {
id "io.spring.dependency-management" version "0.5.2.RELEASE"
}
version "0.1"
group "multipleparentsgrails"
apply plugin: "spring-boot"
apply plugin: "war"
apply plugin: "asset-pipeline"
apply plugin: 'eclipse'
apply plugin: 'idea'
apply plugin: "org.grails.grails-web"
apply plugin: "org.grails.grails-gsp"
ext {
grailsVersion = project.grailsVersion
gradleWrapperVersion = project.gradleWrapperVersion
}
assets {
minifyJs = true
minifyCss = true
}
repositories {
mavenLocal()
maven { url "https://repo.grails.org/grails/core" }
}
dependencyManagement {
imports {
mavenBom "org.grails:grails-bom:$grailsVersion"
}
applyMavenExclusions false
}
dependencies {
compile "org.springframework.boot:spring-boot-starter-logging"
compile "org.springframework.boot:spring-boot-starter-actuator"
compile "org.springframework.boot:spring-boot-autoconfigure"
compile "org.springframework.boot:spring-boot-starter-tomcat"
compile "org.grails:grails-dependencies"
compile "org.grails:grails-web-boot"
compile "org.grails.plugins:hibernate"
compile "org.grails.plugins:cache"
compile "org.hibernate:hibernate-ehcache"
compile "org.grails.plugins:scaffolding"
runtime "org.grails.plugins:asset-pipeline"
testCompile "org.grails:grails-plugin-testing"
testCompile "org.grails.plugins:geb"
// Note: It is recommended to update to a more robust driver (Chrome, Firefox etc.)
testRuntime 'org.seleniumhq.selenium:selenium-htmlunit-driver:2.44.0'
console "org.grails:grails-console"
}
task wrapper(type: Wrapper) {
gradleVersion = gradleWrapperVersion
}
You should be able to specify it like any other dependency
runtime "com.h2database:h2:1.4.190"
There are many dependencies which may use H2. grails, hibernate, others.
I would go into your project. Let's say it's $HOME/projects/myproj.
1) Do a dependency report. Pipe it into grep so you don't have to wade through a 1,000 line report, and see what versions of H2 are being used.
cd $HOME/projects/myproj
./gradlew dependencies | grep 'H2'
2) Find the highest version number, and then explicitly include this in your build.gradle to force every dependency to use the most current version:
dependencies {
// all the other dependencies
runtime "com.h2database:h2:1.4.190" // where 1.4.190 is the most
// current version. as i
// type this it is 1.4.191
// according to maven central
}
I am using Learning LibGDX Game Development and I am on trying to follow the Gradle way. In chapter 4 at the bottom of page 144 it says add:
compile "com.badlogic.gdx:gdx-tools:$gdxVersion"
underneath the section with this code:
project(":desktop")
The build.gradle that I inherited from the book's website is posted below. I added the code in the section with "-desktop" but I got an error from Eclipse.
Here is my error:
Could not find method compile() for arguments [com.badlogic.gdx:gdx-
tools:1.6.4] on org.gradle.plugins.ide.eclipse.model.EclipseProject_Decorated#54d80175.
I am brand spanking new to Gradle, does anybody know what I should do if I want to add the gdx-tools.jar via Gradle?
Build.gradle for desktop project:
apply plugin: "java"
sourceCompatibility = 1.6
sourceSets.main.java.srcDirs = [ "src/" ]
project.ext.mainClassName = "com.packetpub.libgdx.canyonbunny.desktop.DesktopLauncher"
project.ext.assetsDir = new File("../android/assets");
task run(dependsOn: classes, type: JavaExec) {
main = project.mainClassName
classpath = sourceSets.main.runtimeClasspath
standardInput = System.in
workingDir = project.assetsDir
ignoreExitValue = true
}
task dist(type: Jar) {
from files(sourceSets.main.output.classesDir)
from files(sourceSets.main.output.resourcesDir)
from {configurations.compile.collect {zipTree(it)}}
from files(project.assetsDir);
manifest {
attributes 'Main-Class': project.mainClassName
}
}
dist.dependsOn classes
eclipse {
project {
name = appName + "-desktop"
linkedResource name: 'assets', type: '2', location: 'PARENT-1-PROJECT_LOC/android/assets'
compile "com.badlogic.gdx:gdx-tools:$gdxVersion"
}
}
task afterEclipseImport(description: "Post processing after project generation", group: "IDE") {
doLast {
def classpath = new XmlParser().parse(file(".classpath"))
new Node(classpath, "classpathentry", [ kind: 'src', path: 'assets' ]);
def writer = new FileWriter(file(".classpath"))
def printer = new XmlNodePrinter(new PrintWriter(writer))
printer.setPreserveWhitespace(true)
printer.print(classpath)
}
}
You are using the old domain, which is wrong:
compile "com.badlogic.gdx:gdx-tools:$gdxVersion"
Please, replace it for this new:
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
Ensure you put in the correct place:
Tools Gradle
Core Dependency: Dont put me in core!
Desktop Dependency: compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
Android Dependency: Not compatible!
iOS Dependency: Not compatible!
HTML Dependency: Not compatible!
It should be under dependencies branch. But there is no gdxVersion defined in this gradle file also.
I assume you can use a workaround as defining your variable and using under dependencies by adding this code to the end of the gradle file you shared.
dependencies {
def gdxVersion = '1.6.4'
compile "com.badlogic.gdx:gdx-tools:$gdxVersion"
//you can add another libraries as well
}
But I recommend you to manage libGDX dependencies in the project's gradle file for the consistency of module's libGDX versions. By default, libGDX setup creates build.gradle file in the project's root directory. And gdxVersion variable and libGDX dependencies are defined and managed in this file. Like as:
//defines common variables and settings that all projects (modules like desktop, ios, android) use
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = 'YOUR_PROJECT_NAME'
gdxVersion = '1.7.0'
roboVMVersion = '1.8.0'
gwtVersion = '2.6.0'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
//and here desktop module specific settings
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
}
}
With this usage, you can see that all module's libGDX dependencies can be handled by the same way in the desktop module's depencendies. And you can update your libGDX version with one change to the gdxVersion above.
I am trying to setup a libGdx with eclipse using this tutorial
but when I try to build the project I got this error
Configuration on demand is an incubating feature.
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'TestGame'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve de.richsource.gradle.plugins:gwt-gradle-plugin:0.5.
Required by:
:TestGame:unspecified
> Could not GET 'https://repo1.maven.org/maven2/de/richsource/gradle/plugins/gwt-gradle-plugin
/0.5/gwt-gradle-plugin-0.5.pom'.
> Connection to https://repo1.maven.org refused
> Could not GET 'https://jcenter.bintray.com/de/richsource/gradle/plugins/gwt-gradle-plugin/0.
5/gwt-gradle-plugin-0.5.pom'.
> Connection to https://jcenter.bintray.com refused
> Could not resolve com.android.tools.build:gradle:0.13+.
Required by:
:TestGame:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://repo1.maven.org/maven2/com/android/tools/buil
d/gradle/maven-metadata.xml.
> Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-met
adata.xml'.
> Connection to https://repo1.maven.org refused
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from https://jcenter.bintray.com/com/android/tools/build/g
radle/maven-metadata.xml.
> Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/maven-metada
ta.xml'.
> Connection to https://jcenter.bintray.com refused
> Could not resolve org.robovm:robovm-gradle-plugin:1.0.0-alpha-04.
Required by:
:TestGame:unspecified
> Could not GET 'https://repo1.maven.org/maven2/org/robovm/robovm-gradle-plugin/1.0.0-alpha-04
/robovm-gradle-plugin-1.0.0-alpha-04.pom'.
> Connection to https://repo1.maven.org refused
> Could not GET 'https://jcenter.bintray.com/org/robovm/robovm-gradle-plugin/1.0.0-alpha-04/ro
bovm-gradle-plugin-1.0.0-alpha-04.pom'.
> Connection to https://jcenter.bintray.com refused
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more l
og output.
BUILD FAILED
Total time: 2 mins 12.602 secs
And the libGDX ui generated this build gradle file
buildscript {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.5'
classpath 'com.android.tools.build:gradle:0.13+'
classpath 'org.robovm:robovm-gradle-plugin:1.0.0-alpha-04'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.0'
ext {
appName = 'TestingGame'
gdxVersion = '1.4.1'
roboVMVersion = '1.0.0-alpha-04'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
}
}
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
compile "com.badlogicgames.box2dlights:box2dlights:1.2"
}
}
project(":ios") {
apply plugin: "java"
apply plugin: "robovm"
configurations { natives }
dependencies {
compile project(":core")
compile "org.robovm:robovm-rt:${roboVMVersion}"
compile "org.robovm:robovm-cocoatouch:${roboVMVersion}"
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
}
}
project(":html") {
apply plugin: "gwt"
apply plugin: "war"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources"
compile "com.badlogicgames.box2dlights:box2dlights:1.2:sources"
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "com.badlogicgames.box2dlights:box2dlights:1.2"
}
}
tasks.eclipse.doLast {
delete ".project"
}
I Know Maven but I don't know gradle so I can't understand the exception and where I've gone wrong even I did everything in the tutorial, any help please?
After a lot of searching i found that i need to add the GWT that i downloaded to the eclipse plugin and that was not mentioned in the tutorial
so what i did is
in eclipse go to WINDOWS --->PREFERENCE--->GOOGLE ---->WEB TOOLKIT --->add and search for the folder you have extracted its ZIP file
I had a similar problem with Gradle (Could not GET 'https...) but with a different project. I'm behind a firewall as well
I tried using a separate gradle.properties and also tried passing the proxy server/port to gradle via the VM arguments as mentioned by some other posts on SO but neither of those worked
Here's a way I found via Eclipse settings that worked for me
Under Window->Preferences->Network Connections set the Active Provider to Manual
.
Then edit the entries for HTTP and HTTPS and add the proxy server and port there. If your proxy needs your credentials make sure you add those there as well. Try building it again and hopefully it works this time