Titanium JIRA Archive
Appcelerator Community (AC)

[AC-5597] Android: With SDK 7.0.2.GA, Build shows error in "[ERROR] Failed to run dexer:"

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionInvalid
Resolution Date2018-02-24T21:27:40.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterSharif AbuDarda
AssigneeShak Hossain
Created2018-02-13T21:48:02.000+0000
Updated2018-02-24T21:27:40.000+0000

Description

I am trying to build with SDK 7.0.2.GA and I always see this error. In both emulator and device. iOS is fine. [ERROR] Failed to run dexer: [ERROR] [ERROR] Exception in thread "main" java.lang.RuntimeException: java.net.SocketException: Connection reset [ERROR] at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:78 ) [ERROR] at org.gradle.wrapper.Install.createDist(Install.java:47) [ERROR] at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129) [ERROR] at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:48) [ERROR] Caused by: java.net.SocketException: Connection reset [ERROR] at java.net.SocketInputStream.read(SocketInputStream.java:210) [ERROR] at java.net.SocketInputStream.read(SocketInputStream.java:141) [ERROR] at java.io.BufferedInputStream.read1(BufferedInputStream.java:284) [ERROR] at java.io.BufferedInputStream.read(BufferedInputStream.java:345) [ERROR] at sun.net.www.MeteredStream.read(MeteredStream.java:134) [ERROR] at java.io.FilterInputStream.read(FilterInputStream.java:133) [ERROR] at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java :3375) [ERROR] at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java :3368) [ERROR] at org.gradle.wrapper.Download.downloadInternal(Download.java:63) [ERROR] at org.gradle.wrapper.Download.download(Download.java:45) [ERROR] at org.gradle.wrapper.Install$1.call(Install.java:60) [ERROR] at org.gradle.wrapper.Install$1.call(Install.java:47) [ERROR] at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65 ) [ERROR] ... 3 more

Comments

  1. Joshua Quick 2018-02-13

    Are you using a proxy to access the Internet? Or behind a smart switch that blocks certain domains/URLs?
  2. Sharif AbuDarda 2018-02-14

    This is only happening with the latest SDK 7.0.2.GA, The previous SDK 7.0.1.GA build in Android was ok. Any change from the previous one regarding this? I am not under any proxy. But, Possibly behind a smart switch that blocks certain domains/URLs, I need to know those URL's, so we can allow them. Thanks.
  3. Joshua Quick 2018-02-15

    We've added "gradle" to the Android build process in 7.0.2 to handle multidex'ing large apps to make them work on Android 4.x devices. Before Titanium 7.0.2, odds are multidex'ed apps would crash on startup on Android 4.x. The first time the gradle build script is ran, it'll attempt to download from the following URLs. Perhaps they're being block by the smart switch? Try clicking on them. * http://services.gradle.org/distributions/gradle-4.1-all.zip * https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.pom
  4. Sharif AbuDarda 2018-02-15

    These URL's are opening fine. I can download the zip file (90.1MB?!), And the second URL opens as [this](https://ibb.co/kF0G6S). To be clear, On the first build, all the required components should be downloaded? and after subsequent build, it should run fine? Or it's trying to connect to them every single time? If so, I will try on a different network just on the first build. Thanks.
  5. Joshua Quick 2018-02-15

    Gradle will only download them once and they'll be cached to the following directory on Mac... ~/.gradle/caches All subsequent builds, including builds of other apps on the same machine, will grab the cached copy from then on. Gradle will not attempt to download newer versions. We have to hard-code what versions to download in Titanium's build system, so, that's the good news. Note that if you delete the ~/.gradle/caches directory, then the next build will download these dependencies again. This is only useful for build testing purposes though. So, are you still not able to do an Android build? I'm wondering if the following URL is getting blocked, because it should show you XML in your web browser. https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.3.3/proguard-gradle-5.3.3.pom
  6. Sharif AbuDarda 2018-02-16

    Thanks for letting me know, I will try on a different network. I will close it.
  7. Joshua Quick 2018-02-16

    I am worried that a customer might be behind a smart switch as well. So, this is a valid concern. If this is what's actually happening, then we'll have to see about improving the messaging here to reduce the tech-support issues it might cause. Thanks.
  8. Sharif AbuDarda 2018-02-23

    Hello [~jquick], I believe the issue was with the network. I change the network and seems to work fine. Although my first build did take some time before running dexer. But, it was done without issue and also the subsequent build was fine. Additionally, the other projects also run fine now. Thanks.

JSON Source