IDE looks fine, symbols are resolved correctly, but now the imported AAR 
produces an error in running unit tests with error: 

'testClasses" not found in urbanairship-lib-gradle
Error:Could not execute build using Gradle installation 
'/Applications/Android Studio.app/Contents/gradle/gradle-2.2.1'.


On Monday, March 16, 2015 at 1:45:48 PM UTC-7, Greg Macdonald wrote:
>
> We have external jar and aar libraries added to our project using this 
> technique:
> 1. In AS do New Module and select Import .JAR or .AAR Package
>    This creates project folder with a simple build.gradle, proj_name.iml 
> and the jar or aar file
> 2. In dependent module's module dependencies setting, add Module dependency
>    i.e. compile project(':proj_name')
>
> This works fine thru plugin 1.0.1, but if I change to 1.1.0 or later, then 
> I get 'cannot resolve symbol' errors in the editor.  The imports are 
> resolved and the project builds and runs, but, since the AS ide is 
> confused, all symbols from the library show red with the cannot resolve 
> error, and both code completion and the ability to follow a symbol 
> (cmd-click) are broken.
>
> In the case where the lib is a jar, I find I can resolve this by adding to 
> the dependent libr's gradle file:
> dependencies {
>     compile fileTree(dir: '../proj_name_dir', include: ['*.jar'])
> }
>
> Which surely seems a hack, and it doesn't work for aar files.
>
> In the release notes for 1.1.0 comments under "Fixes and changes to the 
> dependency management", there are comments about how dependencies have 
> been made correct.  Are there some notes somewhere on what correct looks 
> like and how I should be doing dependencies on these external libs?
>
> thanks,
> greg
>

-- 
You received this message because you are subscribed to the Google Groups 
"adt-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to