tag:help.appveyor.com,2012-11-13:/discussions/problems/16064-unzip-android-sdkAppVeyor: Discussion 2018-09-10T23:09:03Ztag:help.appveyor.com,2012-11-13:Comment/459692812018-08-26T18:25:11Z2018-08-26T18:25:11Zunzip android-sdk<div><p>It looks like it stuck. Did you try to RDP and see what happened?</p>
<p>But more importantly, do you really need to install it, please check what is installed already: <a href="https://www.appveyor.com/docs/build-environment/#xamarin">https://www.appveyor.com/docs/build-environment/#xamarin</a></p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459692812018-08-26T19:43:40Z2018-08-26T19:43:40Zunzip android-sdk<div><p>Haven't tried rdping, I expect this to work...<br>
I'd love not to install it, but I couldn't find any appveyor article on how to use the android sdk from command line.<br>
I would like to be able to build a cordova project, for that I need to define ANROID_HOME env variable to point to where the sdk is installed.<br>
Also I need java 1.8 SDK installed, which I hope is a pre-requisite to android.<br>
Any help would be appreciated.</p></div>harel.mazortag:help.appveyor.com,2012-11-13:Comment/459692812018-08-27T23:19:54Z2018-08-27T23:19:54Zunzip android-sdk<div><p>I think that this YAML of one of our clients should give you some inspiration: <a href="https://github.com/filmaj/cordova-android/blob/master/appveyor.yml">https://github.com/filmaj/cordova-android/blob/master/appveyor.yml</a>.<br>
Their build: <a href="https://ci.appveyor.com/project/Humbedooh/cordova-android/history">https://ci.appveyor.com/project/Humbedooh/cordova-android/history</a></p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459692812018-08-28T06:00:14Z2018-08-28T06:00:14Zunzip android-sdk<div><p>Thanks for the info! But this doesn't align with what you wrote earlier since they too download the file and unzip it.<br>
I would like to follow your suggestion and avoid it, but I don't know where the android tools are installed.<br>
I know I can RDP, but I'm probably not the only one who asks that - therefore I think an appveyor instruction guide is in order here, IMO.<br>
I think the difference between what I did and what they did that causes the build to get stuck is the " > nul" at the end of the 7z call. I'll give it a try.</p></div>harel.mazortag:help.appveyor.com,2012-11-13:Comment/459692812018-08-28T21:46:24Z2018-08-28T21:46:24Zunzip android-sdk<div><p>If you need to get more information on installed SDKs you can run command like this at <code>install</code> stage:</p>
<pre>
<code>install:
- cmd: '"C:\Program Files (x86)\Android\android-sdk\tools\bin\sdkmanager.bat" --list'</code>
</pre>
<p>If you need to install SDK which does not exist on AppVeyor VM, you can do it with custom script. I found another sample for you: <a href="https://github.com/AArnott/PCLCrypto/blob/master/Install-Dependencies.ps1">https://github.com/AArnott/PCLCrypto/blob/master/Install-Dependenci...</a></p>
<p>We heavily depend on the community when documenting specific SDKs and frameworks build (we are not experts in all possible frameworks). Our documentation and blog sites are open source. Few examples of community contributed docs and blogs:<br>
<a href="https://www.appveyor.com/docs/lang/cpp/">https://www.appveyor.com/docs/lang/cpp/</a><br>
<a href="https://www.appveyor.com/blog/2016/12/23/sonarqube/">https://www.appveyor.com/blog/2016/12/23/sonarqube/</a></p>
<p>You are very welcome to contribute too :)</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459692812018-08-28T22:14:42Z2018-08-28T22:14:42Zunzip android-sdk<div><p>Thanks for the info, I'll see what I can do in order to help out with the docs.<br>
I managed to build my android app on Appveyor but it too gets stuck at the end of the run - much like the unzip got stuck.<br>
The solution for the unzip what to pipe it to nul, but I don't think it's a good solution if I want to see what's going on in the logs.<br>
See my commit here:<br>
<a href="https://github.com/IsraelHikingMap/Site/commit/00567fbc6bdbf790dee6e96906af8859ca45c935">https://github.com/IsraelHikingMap/Site/commit/00567fbc6bdbf790dee6...</a><br>
Can you please check that this is not something related to stdout when running a process in appveyor code?<br>
When I run it locally on my PC the command finishes without hanging.<br>
<a href="https://ci.appveyor.com/project/IsraelHikingHost/site/build/7.1.72">https://ci.appveyor.com/project/IsraelHikingHost/site/build/7.1.72</a><br>
The log is long due to android stuff...</p></div>harel.mazortag:help.appveyor.com,2012-11-13:Comment/459692812018-08-30T20:26:59Z2018-08-30T20:26:59Zunzip android-sdk<div><p>RDP was added exactly for cases like this, so people can debug their scripts. Local machine debug is not good place as it may have some dependencies already installed and generally different from clean VM. If you are not willing to debug, we can debug your scripts for you, but cannot give any promises how soon.<br>
If you decide to go ahead and RDP, remember 2 things:</p>
<ul>
<li>
<p>Do not set <code>APPVEYOR_RDP_PASSWORD</code>, we having intermittent issue with it right now. AppVeyor will generate random password for you.</p>
</li>
<li>
<p>Build environment variables are not available in RDP session (for security reasons) so you may need to re-set the ones required by the script.</p>
</li>
</ul></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459692812018-09-02T11:50:54Z2018-09-02T11:50:54Zunzip android-sdk<div><p>It would help a lot if you could take a look.<br>
I have currently disabled the code that gets stuck in order to have artifacts for my site.<br>
The following commit is the comment-out of the hanging code:<br>
<a href="https://github.com/IsraelHikingMap/Site/commit/d9fb94e39d730263fe6118d5a34ee836cc5bd980">https://github.com/IsraelHikingMap/Site/commit/d9fb94e39d730263fe61...</a><br>
I'll update here in case I get to RDP to debug it.</p></div>harel.mazortag:help.appveyor.com,2012-11-13:Comment/459692812018-09-10T15:19:14Z2018-09-10T15:19:31Zunzip android-sdk<div><p>I've RDP to the computer removed the file so that the build will continue, let the agent run the last command and it got stuck.<br>
I've ran the same command using powershell and it finished OK while the build was running.<br>
Any chance to get assistance here?<br>
I'm not sure how to make this work... :-((<br>
<a href="https://ci.appveyor.com/project/IsraelHikingHost/site/build/7.2.3">https://ci.appveyor.com/project/IsraelHikingHost/site/build/7.2.3</a></p></div>harel.mazortag:help.appveyor.com,2012-11-13:Comment/459692812018-09-10T19:09:16Z2018-09-10T19:09:16Zunzip android-sdk<div><p>I'm hoping the root cause of my issue is described here:<br>
<a href="https://github.com/appveyor/ci/issues/1745">https://github.com/appveyor/ci/issues/1745</a><br>
I'll try and see if the suggested workaround there solves my problem.<br>
In case it does, I suggest to document this somewhere...</p></div>harel.mazortag:help.appveyor.com,2012-11-13:Comment/459692812018-09-10T19:32:44Z2018-09-10T19:32:44Zunzip android-sdk<div><p>Thanks for keeping us in touch. Please let us know how it goes.</p></div>Ilya Finkelshteyntag:help.appveyor.com,2012-11-13:Comment/459692812018-09-10T21:53:36Z2018-09-10T21:53:36Zunzip android-sdk<div><p>The following seems to have fixed the problem:<br>
environment:<br>
GRADLE_OPTS: "-Dorg.gradle.daemon=false"</p>
<p>I copied this solution form cordova-android repository, seem like I'm not the first one to encounter this issue.<br>
It has to do with gradle deamon getting stuck.<br>
I suggest to set this environment variable by default to reduce a lot of time the next person will have to waste trying to fix this...</p></div>harel.mazortag:help.appveyor.com,2012-11-13:Comment/459692812018-09-10T23:09:01Z2018-09-10T23:09:01Zunzip android-sdk<div><p>Excellent, thanks a lot!</p></div>Ilya Finkelshteyn