I've looked into the issue of building without a Custom Build Agent for an android app.
I got it working.
I want to say that early on I tried something almost identical to this; but it didn't work. Why it hated running batch commands and not PowerShell... I have no idea.
Oh... Because it still hates.
OK - Co-Worker got the work android app building on a hosted agent in VSTS. The big difference was using the following PowerShell Script build task set to inline
New-Item -ItemType Directory -Path "C:\java\androidsdk\android-sdk\licenses"
New-Item -Name 'android-sdk-license' -ItemType File -Value '8933bad161af4178b1185d1a37fbf41ea5269c55' -Path "C:\java\androidsdk\android-sdk\licenses"
Get-Content "C:\java\androidsdk\android-sdk\licenses\android-sdk-license"
I put that into a new build... NOPE... I have one other thing to try... and then maybe giving up again.
For reference; here's the error I'm seeing
2017-02-08T03:01:30.1633037Z Installing Android Support Repository in C:\java\androidsdk\android-sdk\extras\android\m2repository
2017-02-08T03:02:00.2737602Z Warning: An error occurred during installation: Failed to move away or delete existing target file: C:\java\androidsdk\android-sdk\extras\android\m2repository
2017-02-08T03:02:00.2747611Z Move it away manually and try again..:
OK - I tried to adjust the support library version - That was a nope. Now gonna try the gradle version?
It's downloading things...
I don't see the Installing Android Support Repository
in my work app's logs.
One more thing I can think of.. There's always "ONE MORE"... I'm modifying the Gradle version...
Nope... So many nopes... I'm missing something; probably simple... but... Still can't figure out for my app. Which is the highly agitating part.
Trying one last thing... and then... I'm moving on to productive things. I started writing this hoping it'd be a quick fix I could share... Not for me.
So.... Apparently no hosted agent for me. Still stuck with a custom agent for now. :(
The last thing I can try; and am not going to night - Is moving the repo into VSTS. That's what the work app does... it's all I got ATM.
Until I try that - I'm off to feel productive!