Local AARs are not yet supported. See https://code.google.com/p/android/issues/detail?id=55863 . The template build.gradle file that the New Project Wizard uses should not have encouraged you to put AAR files in the libs directory; this will be fixed for the next release, though it won't affect projects that have already been created.
On Wed, Feb 12, 2014 at 11:24 PM, Mark Gillespie <[email protected]>wrote: > The error suggests it's a problem with duplicate AndroidManifest.xml > (which there are, one in the main project, one in the aar library project). > > What have I done wrong? Surely this is something the build system can > handle? (the AAR was generated by Android Studio too). > > > Executing tasks: [:test_class:assembleDebug] > > :test_class:compileDebugNdk > :test_class:preBuild > :test_class:preDebugBuild > :test_class:checkDebugManifest > :test_class:prepareDebugDependencies > :test_class:compileDebugAidl > :test_class:compileDebugRenderscript > :test_class:generateDebugBuildConfig > :test_class:mergeDebugAssets > :test_class:generateDebugResValues UP-TO-DATE > :test_class:generateDebugResources > :test_class:mergeDebugResources > :test_class:processDebugManifest > :test_class:processDebugResources > :test_class:generateDebugSources > :test_class:compileDebugJava > :test_class:preDexDebug > :test_class:dexDebug > :test_class:processDebugJavaRes UP-TO-DATE > :test_class:validateDebugSigning > :test_class:packageDebugError: duplicate files during packaging of APK > C:\Users\Mark\AndroidStudioProjects\TestApp\test_class\build\apk\test_class-debug-unaligned.apk > Path in archive: AndroidManifest.xml > Origin 1: > C:\Users\Mark\AndroidStudioProjects\TestApp\test_class\build\libs\test_class-debug.ap_ > Origin 2: > C:\Users\Mark\AndroidStudioProjects\TestApp\test_class\libs\rsslib.aar > You can ignore those files in your build.gradle: > android { > packagingOptions { > exclude 'AndroidManifest.xml' > } > } > FAILED > > FAILURE: Build failed with an exception. > > * What went wrong: > Execution failed for task ':test_class:packageDebug'. > > Duplicate files copied in APK AndroidManifest.xml > File 1: > C:\Users\Mark\AndroidStudioProjects\TestApp\test_class\build\libs\test_class-debug.ap_ > File 2: > C:\Users\Mark\AndroidStudioProjects\TestApp\test_class\build\libs\test_class-debug.ap_ > > > * Try: > Run with --stacktrace option to get the stack trace. Run with --info or > --debug option to get more log output. > > BUILD FAILED > > -- > 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/groups/opt_out. > -- 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/groups/opt_out.
