Search Issue Tracker
Fixed in 2018.2.X
Fixed in 2018.3.X
Votes
13
Found in
2018.1.0a2
2018.2.0a1
Issue ID
1093946
Regression
Yes
[Android][Gradle] Build fails when downloading files from jcenter
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)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Required SpriteMask class (ID 331) is stripped when "Strip Engine Code" is enabled
- “Maximized serialized file backup not found” error is thrown when minimizing a window in a newly opened project
- Build stack trace contains invalid lines when building with IL2CPP using scripts with delegates containing generic types in the signature
- Entities Systems window has a “Show Full Player Loop” dropdown which does nothing when clicked after enabling “Show Full Player Loop”
- Entities Hierarchy Search “Show/Hide” button’s Lens Icon is blurry when the Editor is on an external monitor
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.
vovkas
Dec 15, 2018 09:51
This also occurs on 2018.2.18f1
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
calebbbarton
Oct 25, 2018 00:14
This also occurs on 2018.2.5f1
migs_pixi
Oct 24, 2018 21:29
Also it's quite impossible to override the template for other plugins on the Mac...
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.