I am creating an AAR file using a different aar and jar dependency. I have successfully created the .aar release file.
Then I imported my new AAR file into the Project sample. the project is working fine. when accessing these classes, aar and jar means that it shows a NoClassDefFound error.
Note. First, I want to know that at the moment, AAR is possible inside another AAR or not. can someone help me out of this new problem?
I referenced this link also Created AAR with several AAR / JARs . It says transitive = true. But I don’t understand where to use this flag. In a third-party application using the application or when creating an AAR inside AAR project dependencies.
Thanks. Advance
My mini-project Gradle File:
Mini Project, which only converts to an .AAR file. then this file will use another NewProject
Mini Project Build.gradle File
/* This would be enabled for development purpose and to debug and check the same */ apply plugin: 'com.android.application' /* This would be enabled for exporting as aar file apply plugin: 'com.android.library' */ //apply plugin: 'com.android.library' android { compileSdkVersion 23 buildToolsVersion "23.0.2" dexOptions { javaMaxHeapSize "4g" preDexLibraries = false } defaultConfig { /* This application id would be used for development purpose and to debug and check the same. This would be commented when exporting as library */ applicationId 'com.pss.pssplayer' minSdkVersion 18 targetSdkVersion 23 multiDexEnabled true versionCode 1 versionName "1.0" } aaptOptions { cruncherEnabled = false } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } productFlavors { } } dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:support-v4:23.1.1' compile files('libs/ksoap2-android-assembly-3.2.0-jar-with-dependencies.jar') compile files('libs/secure.jar') compile(project(':getSubProject')) { transitive = true }// this getSubProject also contains one classes jar }
source share