We have a batch file to build our Android application. It basically runs gradlew.bat assemble
. When I remote desktop into the build machine (Windows 8) and run the batch file, everything builds as expected. However, when I invoke the batch file through an NT service, we start getting errors.
The account that the service runs under does have administrative privileges on the machine.
The first error was javax.net.ssl.SSLHandshakeException
. Based on another post Android Studio Gradle build failed. Error:Cause: peer not authenticated, I modified gradle-wrapper.properties
to use http
instead of https
for the distribution url. That took care of this problem.
The next error was also similar but this time it was with downloading pom file. Based on another post android- Gradle: An issue occurred configuring root project android studio, I modified build.gradle
to use http://jcenter.bintray.com/
as the url instead of default https
.
Now I am getting the following error:
Could not parse POM
http://jcenter.bintray.com/com/android/tools/build/gradle/1.1.0/gradle-1.1.0.pom
I am wondering why https
could cause a problem in NT service account but not in normal interactive account. Is there a way to fix it? If not, would appreciate if someone has an insight on what the above error means. Regards.