Skip to main content

I'm a newbie with gradle and I'm incurring in thishaving a dependecy problem. I have the follow project structure:

build.grandlegradle MyAppPro

build.grandlegradle MyAppLibrary

build.grandlegradle ThirdPartyLibraryWrapper

I'm a newbie with gradle and I'm incurring in this problem. I have the follow project structure:

build.grandle MyAppPro

build.grandle MyAppLibrary

build.grandle ThirdPartyLibraryWrapper

I'm a newbie with gradle and I'm having a dependecy problem. I have the follow project structure:

build.gradle MyAppPro

build.gradle MyAppLibrary

build.gradle ThirdPartyLibraryWrapper

Source Link
evi
  • 874
  • 1
  • 9
  • 19

Gradle aar library dependecy in module: failed to resolve

I'm a newbie with gradle and I'm incurring in this problem. I have the follow project structure:

-MyApp -MyAppLibrary -MyAppPro -MyAppFree -ThirdPartyLibraryWrapper --libs\ThirdPartyLibrary.aar 

Both MyAppPro and MyAppFree depend on MyAppLibrary, which depends on ThirdPartyLibraryWrapper. As the name suggests, ThirdPartyLibraryWrapper is a wrapper on an external library, namely ThirdPartyLibrary.aar.

This is my configuration:

build.grandle MyAppPro

apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "com.example" minSdkVersion 8 targetSdkVersion 22 } buildTypes { release { minifyEnabled true proguardFiles 'proguard.cfg' } } } dependencies { compile project(':MyAppLibrary') } 

build.grandle MyAppLibrary

apply plugin: 'com.android.library' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { minSdkVersion 8 targetSdkVersion 22 compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } } buildTypes { release { minifyEnabled true proguardFiles 'proguard.cfg' } } } dependencies { compile project(':ThirdPartyLibraryWrapper') compile 'com.squareup.picasso:picasso:2.5.2' } 

build.grandle ThirdPartyLibraryWrapper

apply plugin: 'com.android.library' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { minSdkVersion 8 targetSdkVersion 22 } buildTypes { release { minifyEnabled true proguardFiles 'proguard.cfg' } } } repositories { flatDir { dirs 'libs' } } dependencies { compile(name: 'ThirdPartyLibrary-0.1.0', ext: 'aar') compile "com.android.support:support-v4:22.0.0" compile fileTree(dir: 'libs', include: 'volley.jar') compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3' } 

When gradle sync completes, I have got this error:

MyApp/MyAppFre/ build.gradle: failed to resolve ThirdPartyLibrary-0.1.0 MyApp/MyAppLibrary/ build.gradle: failed to resolve ThirdPartyLibrary-0.1.0 MyApp/MyAppPro/ build.gradle: failed to resolve ThirdPartyLibrary-0.1.0 

Can someone help me figure out where is the issue?