You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 26, 2023. It is now read-only.
Could not find AndroidManifest.xml file using generation folder #2034
Android build fails with this error message: Error:Could not find the AndroidManifest.xml file, using generation folder [.../app/build/generated/source/apt/debug])
The manifest file is actually located at: .../app/build/intermediates/manifests/full/some_product_flavor/debug/AndroidManifest.xml
While this looks like a duplicate to #2028 (similar issue with lates 3.0.0-alpha and kotlin build) I wonder why you find your manifest in ../app/build/intermediates/manifests/full/some_product_flavor/debug/AndroidManifest.xml but no flavor config in your build.gralde?
@WonderCsabo yes, I don't have any product flavors at all. No universal apk is generated only the split ones and their version code is updated as follows:
// Map for the version code that gives each ABI a value.
ext.abiCodes = ['armeabi':1, 'armeabi-v7a':2, 'arm64-v8a':3, 'mips':4, 'x86':5, 'x86_64':6]
// For per-density APKs, create a similar map like this:// ext.densityCodes = ['mdpi': 1, 'hdpi': 2, 'xhdpi': 3]importcom.android.build.OutputFile// For each APK output variant, override versionCode with a combination of// ext.abiCodes * 1000 + variant.versionCode. In this example, variant.versionCode// is equal to defaultConfig.versionCode. If you configure product flavors that// define their own versionCode, variant.versionCode uses that value instead.
android.applicationVariants.all { variant->// Assigns a different version code for each output APK// other than the universal APK.
variant.outputs.each { output->// Stores the value of ext.abiCodes that is associated with the ABI for this variant.def baseAbiVersionCode =// Determines the ABI for this variant and returns the mapped value.
project.ext.abiCodes.get(output.getFilter(OutputFile.ABI))
// Because abiCodes.get() returns null for ABIs that are not mapped by ext.abiCodes,// the following code does not override the version code for universal APKs.// However, because we want universal APKs to have the lowest version code,// this outcome is desirable.if (baseAbiVersionCode !=null) {
// Assigns the new version code to versionCodeOverride, which changes the version code// for only the output APK, not for the variant itself. Skipping this step simply// causes Gradle to use the value of variant.versionCode for the APK.
output.versionCodeOverride =
baseAbiVersionCode *100000+ variant.versionCode
}
}
}
This issue resurfaces in the latest Android Studio build.
Android Studio 3.3 Canary 2
Build #AI-181.5281.24.33.4869471, built on June 29, 2018
JRE: 1.8.0_152-release-1136-b04 x86_64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
macOS 10.13.5
error: Could not find the AndroidManifest.xml file, using generation folder [/Users/ed/sl-android/app/build/generated/source/apt/debug])
Having to go down this path for Material Design artifacts that I need. Jumped off the cliff of 'JetPack' and it appears my JetPack isn't starting... sigh
Reacted by Morten Holmgaard, Italo Borssatto, Mohamed Hamdy and Lavekush Agrawal
I also get this error now when I upgraded to use the new gradle version 4.6 and build tools 3.2.0
When I change back to gradle 4.4 and build tools 3.1.4 the problem is gone! @dodgex
I have multiple flavors and this kapt configuration:
I had the same problem today and after reading the documentation I found that you can set the default manifest path. I solved it by adding into buld.gradle(Module:app) into defaultConfig{..}
javaCompileOptions { annotationProcessorOptions { arguments = ["androidManifestFile": "D:\\Projects\\Android-Project\\app\\src\\main\\AndroidManifest.xml"] //add your path to AndroidManifest.xml } }
Reacted by Ed Tidwell, Juarez Franco, Juan Mendez, woniuzzt, Luiz Otávio Dorigon, Gilles Braun, Bruno Buiret, codenameDuchess, Ahri and 一禅小和尚
Reacted by Freddy Barrios, Juan Mendez, Satoshi Kono, Peter Molcany, Nur Iman Izam, Marc Shilling, alex-pl, ductranit, peiandsky, Krzysztof Gonia and 19 more
Reacted by Ed Tidwell, Juarez Franco, Amit Pal, Pedro , Gervásio Júnior, Freddy Barrios, Zakariae Filali, Viktor Dela Cruz, codenameDuchess, Corical and 1 more
Reacted by Paulo Cella
Reacted by Juan Mendez, peiandsky, AleksandrP, codenameDuchess and 一禅小和尚
@krischik if you are using AndroidStudio 3.5 and getting manifest not found, test the 4.7.0-SNAPSHOT of AA. it contains an updated version of the AndroidManifestFinder that works with AS3.5
@krischik the way of doing it was already described in my response
No it wasn't. Your response was incomplete. It was missing:
android {
…
defaultConfig {
You response was a typical power user response. Missing important context informations because you thought “everybody” would know the correct place to put the code snippet.
@krischik the only problem is that you don't understand how to properly read a response nor appreciate the fact that is offered to you. It's clearly explained where to put it " I solved it by adding into buld.gradle(Module:app) into defaultConfig{..}". More of it, it's nice that everybody else managed to understand it :).
Android build fails with this error message:
Error:Could not find the AndroidManifest.xml file, using generation folder [.../app/build/generated/source/apt/debug])The manifest file is actually located at:
.../app/build/intermediates/manifests/full/some_product_flavor/debug/AndroidManifest.xmlAndroidAnnotations version: 4.3.1
Android compile SDK version: 26
Here's the gradle file contents:
Stacktrace in case of AA crash: