Android CI build: Could not find aapt2-proto.jar

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
7
down vote

favorite












I have failing build on bitbucket CI server:



> 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


I searched similar questions that suggested google maven repository is missing, but I am not missing it, top level build file:



buildscript 

repositories
jcenter()
google()

dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin"



allprojects
repositories
google()
jcenter()
maven url "https://jitpack.io"




and my app level build file:



buildscript 
repositories
maven url 'https://maven.fabric.io/public'
google()


dependencies
classpath 'io.fabric.tools:gradle:1.26.1'


apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'

repositories
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()










share|improve this question



















  • 2




    opening jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/… in browser gives 404, could it be broken jcenter / the library was moved ?
    – estn
    1 hour ago















up vote
7
down vote

favorite












I have failing build on bitbucket CI server:



> 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


I searched similar questions that suggested google maven repository is missing, but I am not missing it, top level build file:



buildscript 

repositories
jcenter()
google()

dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin"



allprojects
repositories
google()
jcenter()
maven url "https://jitpack.io"




and my app level build file:



buildscript 
repositories
maven url 'https://maven.fabric.io/public'
google()


dependencies
classpath 'io.fabric.tools:gradle:1.26.1'


apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'

repositories
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()










share|improve this question



















  • 2




    opening jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/… in browser gives 404, could it be broken jcenter / the library was moved ?
    – estn
    1 hour ago













up vote
7
down vote

favorite









up vote
7
down vote

favorite











I have failing build on bitbucket CI server:



> 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


I searched similar questions that suggested google maven repository is missing, but I am not missing it, top level build file:



buildscript 

repositories
jcenter()
google()

dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin"



allprojects
repositories
google()
jcenter()
maven url "https://jitpack.io"




and my app level build file:



buildscript 
repositories
maven url 'https://maven.fabric.io/public'
google()


dependencies
classpath 'io.fabric.tools:gradle:1.26.1'


apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'

repositories
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()










share|improve this question















I have failing build on bitbucket CI server:



> 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


I searched similar questions that suggested google maven repository is missing, but I am not missing it, top level build file:



buildscript 

repositories
jcenter()
google()

dependencies
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin"



allprojects
repositories
google()
jcenter()
maven url "https://jitpack.io"




and my app level build file:



buildscript 
repositories
maven url 'https://maven.fabric.io/public'
google()


dependencies
classpath 'io.fabric.tools:gradle:1.26.1'


apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'

repositories
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()







android continuous-integration






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 1 hour ago









Redman

5,01233056




5,01233056










asked 1 hour ago









estn

12818




12818







  • 2




    opening jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/… in browser gives 404, could it be broken jcenter / the library was moved ?
    – estn
    1 hour ago













  • 2




    opening jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/… in browser gives 404, could it be broken jcenter / the library was moved ?
    – estn
    1 hour ago








2




2




opening jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/… in browser gives 404, could it be broken jcenter / the library was moved ?
– estn
1 hour ago





opening jcenter.bintray.com/com/android/tools/build/aapt2-proto/0.3.1/… in browser gives 404, could it be broken jcenter / the library was moved ?
– estn
1 hour ago













1 Answer
1






active

oldest

votes

















up vote
9
down vote



accepted










You should try to move the google() method (In all .gradle files) to the top of it's execution block, maybe it's the order of repos it searches in that causes the issue.



So for example, change this:



repositories 
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()



To this:



repositories 
google()
maven url 'https://maven.fabric.io/public'
mavenCentral()



If that doesn't help, instead of calling the google() method, try changing it to this:



maven 
url 'https://maven.google.com/'
name 'Google'






share|improve this answer




















  • Thanks, this worked for me
    – Timo
    1 hour ago






  • 2




    moving google up worked, thx
    – estn
    1 hour ago










  • still not working for me
    – Viswanath Kumar Sandu
    6 mins ago










  • A problem occurred configuring root project 'XXXXXXXXXx'. > 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: plugins.gradle.org/m2/com/android/tools/build/aapt2-proto/0.3.1/…
    – Viswanath Kumar Sandu
    2 mins ago










Your Answer





StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52944351%2fandroid-ci-build-could-not-find-aapt2-proto-jar%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
9
down vote



accepted










You should try to move the google() method (In all .gradle files) to the top of it's execution block, maybe it's the order of repos it searches in that causes the issue.



So for example, change this:



repositories 
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()



To this:



repositories 
google()
maven url 'https://maven.fabric.io/public'
mavenCentral()



If that doesn't help, instead of calling the google() method, try changing it to this:



maven 
url 'https://maven.google.com/'
name 'Google'






share|improve this answer




















  • Thanks, this worked for me
    – Timo
    1 hour ago






  • 2




    moving google up worked, thx
    – estn
    1 hour ago










  • still not working for me
    – Viswanath Kumar Sandu
    6 mins ago










  • A problem occurred configuring root project 'XXXXXXXXXx'. > 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: plugins.gradle.org/m2/com/android/tools/build/aapt2-proto/0.3.1/…
    – Viswanath Kumar Sandu
    2 mins ago














up vote
9
down vote



accepted










You should try to move the google() method (In all .gradle files) to the top of it's execution block, maybe it's the order of repos it searches in that causes the issue.



So for example, change this:



repositories 
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()



To this:



repositories 
google()
maven url 'https://maven.fabric.io/public'
mavenCentral()



If that doesn't help, instead of calling the google() method, try changing it to this:



maven 
url 'https://maven.google.com/'
name 'Google'






share|improve this answer




















  • Thanks, this worked for me
    – Timo
    1 hour ago






  • 2




    moving google up worked, thx
    – estn
    1 hour ago










  • still not working for me
    – Viswanath Kumar Sandu
    6 mins ago










  • A problem occurred configuring root project 'XXXXXXXXXx'. > 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: plugins.gradle.org/m2/com/android/tools/build/aapt2-proto/0.3.1/…
    – Viswanath Kumar Sandu
    2 mins ago












up vote
9
down vote



accepted







up vote
9
down vote



accepted






You should try to move the google() method (In all .gradle files) to the top of it's execution block, maybe it's the order of repos it searches in that causes the issue.



So for example, change this:



repositories 
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()



To this:



repositories 
google()
maven url 'https://maven.fabric.io/public'
mavenCentral()



If that doesn't help, instead of calling the google() method, try changing it to this:



maven 
url 'https://maven.google.com/'
name 'Google'






share|improve this answer












You should try to move the google() method (In all .gradle files) to the top of it's execution block, maybe it's the order of repos it searches in that causes the issue.



So for example, change this:



repositories 
maven url 'https://maven.fabric.io/public'
google()
mavenCentral()



To this:



repositories 
google()
maven url 'https://maven.fabric.io/public'
mavenCentral()



If that doesn't help, instead of calling the google() method, try changing it to this:



maven 
url 'https://maven.google.com/'
name 'Google'







share|improve this answer












share|improve this answer



share|improve this answer










answered 1 hour ago









HedeH

1,311613




1,311613











  • Thanks, this worked for me
    – Timo
    1 hour ago






  • 2




    moving google up worked, thx
    – estn
    1 hour ago










  • still not working for me
    – Viswanath Kumar Sandu
    6 mins ago










  • A problem occurred configuring root project 'XXXXXXXXXx'. > 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: plugins.gradle.org/m2/com/android/tools/build/aapt2-proto/0.3.1/…
    – Viswanath Kumar Sandu
    2 mins ago
















  • Thanks, this worked for me
    – Timo
    1 hour ago






  • 2




    moving google up worked, thx
    – estn
    1 hour ago










  • still not working for me
    – Viswanath Kumar Sandu
    6 mins ago










  • A problem occurred configuring root project 'XXXXXXXXXx'. > 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: plugins.gradle.org/m2/com/android/tools/build/aapt2-proto/0.3.1/…
    – Viswanath Kumar Sandu
    2 mins ago















Thanks, this worked for me
– Timo
1 hour ago




Thanks, this worked for me
– Timo
1 hour ago




2




2




moving google up worked, thx
– estn
1 hour ago




moving google up worked, thx
– estn
1 hour ago












still not working for me
– Viswanath Kumar Sandu
6 mins ago




still not working for me
– Viswanath Kumar Sandu
6 mins ago












A problem occurred configuring root project 'XXXXXXXXXx'. > 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: plugins.gradle.org/m2/com/android/tools/build/aapt2-proto/0.3.1/…
– Viswanath Kumar Sandu
2 mins ago




A problem occurred configuring root project 'XXXXXXXXXx'. > 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: plugins.gradle.org/m2/com/android/tools/build/aapt2-proto/0.3.1/…
– Viswanath Kumar Sandu
2 mins ago

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52944351%2fandroid-ci-build-could-not-find-aapt2-proto-jar%23new-answer', 'question_page');

);

Post as a guest













































































Comments

Popular posts from this blog

What does second last employer means? [closed]

List of Gilmore Girls characters

Confectionery