Search Issue Tracker

Fixed in 2018.2

Fixed in 2018.3

Votes

13

Found in

2018.1.0a2

2018.2.0a1

Issue ID

1093946

Regression

Yes

[Android][Gradle] Build fails when downloading files from jcenter

Mobile

-

Steps to reproduce:
1. Delete ',gradle' folder from %USERPROFILE% folder
2. Create a new project
3. Attempt to build an apk

Reproduced on: 2018.3.0b11, 2018.2.0a1, 2018.2.14f1, 2018.3.0b7, 2019,.1.0a6
Not reproducible on: 2017.4.14f1, 2018.1.9f2

Error:
A problem occurred configuring root project 'gradleOut'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/aapt2-proto-0.3.1.jar

Workaround: Create a custom 'mainTemplate'gradle' file and reorder 'repositories' of 'buildscript' and 'allprojects' so that 'jcenter' is not on top.
To create a custom template file go to Player Settings > Publishing Settings > Build > Custom Gradle Template

Comments (7)

  1. 67ca0e500374e3ff557dfbb672c572d1?d=mm

    abolfazlk0

    Jul 23, 2019 05:06

    Great write-up, I am a big believer in commenting on blogs to https://tikban.com/بلیط-کیش And https://tikban.com/بلیط-مشهد And https://tikban.com/بلیط-هواپیما-ماهان And https://tikban.com/بلیط-هواپیما-ایران-ایر And https://tikban.com/بلیط-هواپیما-آسمان inform the blog writers know that they've added something worthwhile to the world wide web!

  2. 4f4111a80a1f3fae927a63418e3f5a84?d=mm

    Vagabond-Software

    Dec 16, 2018 19:03

    Ran into the same problem. Everything was building fine on 2018.2.7f1 two days ago.
    Suddenly this error popped up. Workaround does not work either. It still tries to fetch the files from jcenter.
    If you follow the links in the error message they indeed return "resource not found".

    Just to make sure it does not have anything to do with plugins I created a new empty project and tried to build with an empty scene. Same error.

  3. 2bc6fb7f82c48c9e6333bb276948fcd7?d=mm

    vovkas

    Dec 15, 2018 09:51

    This also occurs on 2018.2.18f1

  4. Ffe6f06b22cebbef449c7d80399cdad8?d=mm

    daniel-hall

    Oct 25, 2018 14:05

    For anyone needing to use cloud build with plugins in the meantime before the official fix, I got it working like this:

    https://forum.unity.com/threads/builds-started-failing-in-2-projects-ive-been-changing-with-could-not-find-intellij-core-jar.573055/#post-3820144

  5. 28feeb032f61946eb8c62caff5d099ca?d=mm

    calebbbarton

    Oct 25, 2018 00:14

    This also occurs on 2018.2.5f1

  6. A6aee2da1db49268dfd22861b301b67b?d=mm

    migs_pixi

    Oct 24, 2018 21:29

    Also it's quite impossible to override the template for other plugins on the Mac...

  7. 04d12d67e22735489d0189f8b887ad46?d=mm

    NamekGames

    Oct 24, 2018 21:16

    Yeah, thats great, but the workaround doesn't work when other plugins are present and generating their own gradle files.

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.