adwiv / android-fat-aar

Gradle script that allows you to merge and embed dependencies in generted aar file
The Unlicense
1.46k stars 435 forks source link

Caused by: java.io.FileNotFoundException in Gradle 2.14.1 #27

Closed verzth closed 7 years ago

verzth commented 7 years ago

File not found X:\Something\build\intermediates\bundles\release\aapt\AndroidManifest.xml

Sfavilla commented 7 years ago

same issue

m-ivanov commented 7 years ago

+1 Android Studio 2.2 & grade:2.2.0

nicolasd commented 7 years ago

+1 the plugin is not compatible with gradle 2.2

19 #23

m-ivanov commented 7 years ago

this seems to fix the problem, i don't know about R.

@@ -139,7 +139,7 @@ private List getMergedInputResourceSets(List inputResourceSet) {
     embeddedAarDirs.each { aarPath ->
         try {
             def resname = (aarPath.split("build/intermediates/exploded-aar/")[1]).replace('/', ':');
-            def rs = ResourceSetClass.newInstance([resname] as Object[])
+            def rs = ResourceSetClass.newInstance(resname as String, true)
             rs.addSource(file("$aarPath/res"))
             // println "ResourceSet is " + rs
             newInputResourceSet += rs
@@ -325,6 +325,7 @@ task embedManifests << {
                 }
                 save(xmlDocument, new File(outManifestLocation));
                 if (outAaptSafeManifestLocation != null) {
+                    mkdir("build/intermediates/bundles/release/aapt")
                     new PlaceholderEncoder().visit(xmlDocument);
                     save(xmlDocument, new File(outAaptSafeManifestLocation));
                 }
nicolasd commented 7 years ago

Ok, but there's still the bug with the R.java of the aar that is not embedded into the fat aar :)

adwiv commented 7 years ago

Kindly test with the updated version which appears to be compatible with 2.2.0 and report issues if any.

adwiv commented 7 years ago

Hi @Anvesh46, Can you please check with the updated version release just now? I don't get this issue with my test cases, so can't test.

Anvesh46 commented 7 years ago

please close it it is working