[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Android-tools-devel] build.gradle: unable to resolve class com.google.common.collect.ImmutableMap



This fixed in it in the end:

 buildscript {
   dependencies {
     classpath 'com.google.guava:guava:debian'
   }
 }

.hc

殷啟聰:
> Add the following to the beginning of "build.gradle":
> 
> ```
> buildscript {
>   dependencies {
>     compile 'com.google.guava:guava:debian'
>   }
> }
> ```
> 
> And see what happens :)
> 
> 2016-12-23 7:31 GMT+08:00 Hans-Christoph Steiner <hans@at.or.at>:
>>
>> I'm trying to update the Android gradle plugin (java/groovy/gradle) to
>> the latest release in time for stretch.  I already updated the dependent
>> lib android-platform-frameworks-data-binding to 2.2.2 and uploaded that.
>>  Seamlik uploaded
>> android-platform-tools-analytics-library and this is already using that.
>>  Now I'm stumped by a build.gradle that is importing a Java class from
>> libguava, but its not being found.  This advanced gradle is a bit beyond
>> me.  My work is all current in their respective git repos.
>>
>> android-platform-tools-base:
>>
>> import com.google.common.collect.ImmutableMap
>>
>> apply plugin: 'java'
>> apply plugin: 'jacoco'
>> [snip]
>>
>>
>> Here's the stacktrace:
>>
>> [snip]
>> Caused by:
>> org.codehaus.groovy.control.MultipleCompilationErrorsException: startup
>> failed:
>> build file
>> '/export/share/code/android-tools/android-platform-tools-base/sdklib/build.gradle':
>> 1: unable to resolve class com.google.common.collect.ImmutableMap
>>  @ line 1, column 1.
>>    import com.google.common.collect.ImmutableMap
>>    ^
>>
>> 1 error
>>
>>         at
>> org.gradle.groovy.scripts.internal.DefaultScriptCompilationHandler.compileScript(DefaultScriptCompilationHandler.java:129)
>>         ... 96 more
>>
>>
>> BUILD FAILED
>>
>>
>> _______________________________________________
>> Android-tools-devel mailing list
>> Android-tools-devel@lists.alioth.debian.org
>> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/android-tools-devel
> 


Reply to: