How to fix ERROR: No signature of method: build_ap86oam3dut3pxce3x49rdtma.android()? - android
ERROR: No signature of method: build_ap86oam3dut3pxce3x49rdtma.android() is applicable for argument types: (build_ap86oam3dut3pxce3x49rdtma$_run_closure1) values: [build_ap86oam3dut3pxce3x49rdtma$_run_closure1#47588b04]
The build gradle is:
apply plugin: 'com.android.application'
android{
implementationSdkVersion 28
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.uiresource.taksiku"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.3-alpha', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation "com.android.support:appcompat-v7:$var"
implementation 'com.android.support:design:28.0.0'
testimplementation 'junit:junit:4.13'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta5'
implementation 'de.hdodenhof:circleimageview:3.1.0'
}
If you are using kotlin version 1.4.21 or newer, kotlin-android-extension is deprecated.
So if you removing the plugin you also have to remove the android experimental extension block.
In my case, I had to remove these pieces of code.
apply plugin: 'kotlin-android-extensions'
androidExtensions {
experimental = true
}
But if above did not fix it
This a kind of general and/or wrapping error which hides the real cause and/or problem, hence to see actual error message, try something like:
./gradlew :app:assembleDebug --stacktrace
And search for resulting real error-message instead.
I had the same error message until I commented out everything in the android plugin except the compile sdk version, trying to get back to a successful build config.
android {
compileSdkVersion 23
/*
...
*/
}
Then, I started uncommenting things until I narrowed the problem down to using the following incorrectly.
ProductFlavors {
...
}
I'm not sure if you're using the same block, but at the moment, I'm leaving it commented out because I'm not sure it's needed. Once I got rid of it though, I was receiving other errors about sdk root dir location, so I was able to fix those.
I hope this helps!
I was getting a similar error because the versionCode was being taken from a properties file, but the versionCode needs to be an integer and not a string, so toInteger() was needed.
Nice logs, android.
Best thing you can do is comment parts of your build.gradle file related to the issue until you get a good build and them uncomment 1 by 1 until you find the problem. I had the same error and it was related with a typo in one of the app build.gradle blocks. I was using:
android {
...
buildFeature {
...
}
}
instead of
android {
...
buildFeatures {
...
}
}
Good luck!
This is a syntax error somewhere in your gradle file inside the android {} closure. If you are someone having this same problem then the best solution to this problem is to comment out portions of code inside android {} and keep running gradle sync until you have a successful build. Then slowly add back commented out lines until you find the culprit.
in my case I needed to comment out this lines in gradle
androidExtensions{
experimental = true
}
This issue is usually related to some change on build.gradle file, for example in my case, was this line in the defaultConfig section on that file:
versionCode 1.1
I changed it to:
versionCode 2
and problem fixed.
I removed this code from my Gradle:
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
In Android Studio 2021.1.1 Canary 12, I removed
plugins{
...
id 'kotlin-android-extensions'
}
But forgot to remove this from
android{
androidExtensions {
experimental = true
}
}
after removing androidExtension block my problem solved
I was checking a very old project from Github and found the solution by matching the app level build.gradle file with my current project, hence the solution is to replace
runProguard false
with
minifyEnabled false
It must've been deprecated and removed in a later build which caused a similar issue - No signature of method: build_6f958jjxpxn7lllu9wu5brezx.android()
There's no unique solution for this error, except that it's a syntax error inside build.gradle file.
I'm using JAVA, but for some reason Android Studio added kotlinOptions into android block without my knowledge. And then the same error happened. I put here just in case someone need it.
android {
// ...
// remove this block if you are using Java
kotlinOptions {
jvmTarget = '1.8'
}
// ...
}
It is because there's syntax error in android{..} part of build.gradle
You've used implementationSdkVersion which should ideally be compileSdkVersion. Error in variable names in android{..} leads to such errors.
TLDR;
Replace implementationSdkVersion with compileSdkVersion
I just removed useProguard true in build.gradle > android > buildTypes, and it worked for me.
i was trying to add parcelable plugin in my project. this was the same error in my case too. Because, JetBrains extracted the Parcelize from Kotlin Android Extensions to a new plugin, kotlin-parcelize
So, If you want to add easy parcelable in kotlin then follow these steps:
First you will need to add kotlin-parcelize plugin to your module
plugins {
..
id 'kotlin-parcelize'
}
Then change your old import statement from
import kotlinx.android.parcel.Parcelize
to
import kotlinx.parcelize.Parcelize
Example:
import kotlinx.parcelize.Parcelize
import android.os.Parcelable
#Parcelize
class User(
val name: String,
val age: Int
): Parcelable
I'm new to Android but i got a message similar to yours today when i try to use a different version (not the suggested ones) of the Gradle plugin and gradle engine on Android Studio 4.1 canary.
When I had on my App build.gradle these lines:
task wrapper(type: Wrapper){
gradleVersion = '5.6.4'
}
and on my build.gradle for the module this line
classpath 'com.android.tools.build:gradle:3.6.3'
This was the message i got with previous settings:
A problem occurred evaluating project ':app'.
> No signature of method: build_5dcjpn4h9nkpym0yszxs5w2uh.android() is applicable for argument types: (build_5dcjpn4h9nkpym0yszxs5w2uh$_run_closure1) values: [build_5dcjpn4h9nkpym0yszxs5w2uh$_run_closure1#2e4515b3]
The way i found to solve this error was changing version for the gradle plugin on my build.gradle for the module like this
classpath 'com.android.tools.build:gradle:4.0.0'
I hope this could help you.
Happy coding!
For me I had updated firebase-crashlytics-gradle from 2.5.2 to 2.7.1 in my project build.gradle and that caused the issue.
dependencies {
[...]
classpath "com.google.firebase:firebase-crashlytics-gradle:2.7.1
}
I removed an unnecessary firebaseCrashlytics configuration in my app module build.grade and then it worked again:
// TODO this entire block had to be deleted to fix the issue
firebaseCrashlytics {
mappingFileUploadEnabled = false
}
This problem is common in Flutter 2.8
Delete Folder with all sub Folder of C:\Users\LENOVO\.gradle
Go File menu > Setting (Ctrl+Alt+S)
Go Appearance & Behaviour > System Setting > Android SDK > SDK Tool Tab
and then uncheck Android SDK Build-Tool press OK Button
3)Run Project (Shift+F10) in Andriod Studio it will Download all required files from the internet and your issue resolve
After if the issue is Not resolved then Second Step is:
Go > android\app\build.gradle in your project
Please Add > minSdkVersion 19 or 20
// Remove it because, 16 is by default minSdkVersion in flutter 2.8
//minSdkVersion flutter.minSdkVersion
add multiDexEnabled true if file size increase from limits
I added debug under buildTypes in the gradle file and missed a comma after "API_URL":
not working:
buildTypes {
...
debug {
buildConfigField "String", "API_URL" "\"http://myapi.com/\""
}
}
working:
buildTypes {
...
debug {
buildConfigField "String", "API_URL", "\"http://myapi.com/\""
}
}
good luck!
For me, the problem was in this block
defaultConfig {
applicationId "abc"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 12.1 **-> 13**
versionName "3"
}
The 'versionCode' mustn't be a decimal number
I had a problem similar to #LalitFauzdar 's but with a different solution. A plugin that I'm using requires custom ProGuard rules for release builds, but adding a reference to the rules file in the app gradle file resulted in the error in question. Here is the offending line, commented-out:
buildTypes {
release {
signingConfig signingConfigs.release
// proguardFiles 'proguard-rules.pro'
}
}
I had this error when i added 2 product flavors to my build.gradle app module file with the following names:
productFlavors {
normal-sv1 {
...
}
normal-sv2 {
...
}
}
Found out that this error was because of the '-' int the middle of the flavors' names.
When i used '_' instead of '-', like below, the error was gone.
productFlavors {
normal_sv1 {
...
}
normal_sv2 {
...
}
}
I received this error while creating a new Jetpack Compose project. 'app' module's build.gradle was cracking up.
Removing packagingOptions did the trick for me ->
packagingOptions {
resources {
excludes += '/META-INF/{AL2.0,LGPL2.1}'
}
}
}
There is no general answer to this problem. There is just something wrong with the app/build.gradle.
In my case I defined a variable named versionCode which caused the error. Renaming it to e.g. versionCode_ fixed the problem.
Make sure you are using the kotlin android plugin instead of the kotlin jvm plugin.
apply plugin: 'kotlin-android' // NOT kotlin-jvm
I had a similar issue because I had added a trailing comma , in defaultConfig in android/app/build.gradle
Try to comment this in your app level build.gradle file
openOptions {
disable 'InvalidPackage'
}
Thanks for mentioning to just comment things and test, for me it was:
kapt {
useBuildCache = true
}
Removed it, everything was building again.
Happened after updating Kotlin version.
Old issue but worth noting you might need to follow the migration guide here if you see this issue:
https://developer.android.com/topic/libraries/view-binding/migration
For me, removing the line apply plugin: 'kotlin-android-extensions' and adding view binding as below resolved the issue:
buildFeatures {
viewBinding true
}
I got this problem after adding
kapt {
// etc
}
because I hadn't added:
apply plugin: 'kotlin-kapt'
Related
Android Dynamic Feature INSTALL_FAILED_INVALID_APK
I am trying to add some functionality to an existing application. The app's build.gradle contains several productFlavors and a couple of buildTypes. I have tried to replicate that as best I can in my dynamic-feature module, but I cannot seem to get it to install properly from Android Studio. I followed the example from: https://github.com/googlearchive/android-dynamic-features to set up my feature module, so my project is structured like app features/module/build.gradle build.gradle I added a buildType and flavor to the app build.gradle defaultConfig { minSdkVersion 24 targetSdkVersion 28 } dynamicFeatures = [":features:module"] buildTypes{ myBuildType { debuggable true multiDexEnabled true } } flavorDimensions "blah" productFlavors{ arm64 { ndk { abiFilters "arm64-v8a" } ext { abiVersionCode = 5 } matchingFallbacks = ['defaultFlavor'] } } and in the module build.gradle, I have attempted to match that with: defaultConfig { minSdkVersion 24 targetSdkVersion 28 } buildTypes { dynamic { multiDexEnabled true debuggable true } } flavorDimensions "blah" productFlavors { arm64 { ext { abiVersionCode = 5 } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(':app') } In my Run->Edit Configuration screen, I have put a checkbox next to both the base app and the module under the dynamic features to deploy section. I am trying to test this on a Nokia 6, with Android 9.0 running on it. The only output I get from the build is: 01/12 22:39:25: Launching 'app' on HMD Global TA-1025. Installation did not succeed. The application could not be installed: INSTALL_FAILED_INVALID_APK The APKs are invalid.
It just happened to me. Turns out I was setting different flavors for different modules. Try selecting the same variants under View > Tool Windows > Build Variants.
Please check those things 1) making sure that the AndroidManifest.xml package name was the same as the build.grade applicationId 2) check package name in your Androidmanifest.xml see whether started with one empty space character. like " com.example.test" instead of "com.example.test" and make sure contain at least one dot in your package name like "com.exampletest" instead of "comexampletest" https://code.google.com/p/android/issues/detail?id=55841 3)"Build" > "Clean Project" 4)reboot the android system
Try Edit Configurations > Installations Options > Deploy APK from app bundle
I found a solution that resolved my problem. Make sure your libraries and class paths are up to date. I had a class for firebase plugins that were out of date. This problem occurred when using the new graddle. After updating the classpath, everything looks fine. In my case. I changed this classpath 'com.google.firebase:firebase-plugins:1.1.0' to this classpath 'com.google.firebase:perf-plugin:1.3.1'
I had same problem when I used Flavors (Build variants) in my app. The solution for me was select another build variant in Build Variants tab (for example, release instead of debug flavor), then select the correct build variant, and then Clean, Rebuild. I found this solution here: https://stackoverflow.com/a/65630971/6543967
Android Studio 3.0 Execution failed for task: unable to merge dex
android studio was getting build error while build execution with following: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex" My app:build.gradle file: apply plugin: 'com.android.application' android { compileSdkVersion 26 buildToolsVersion '26.0.2' defaultConfig { applicationId "com.pdroid.foodieschoice" minSdkVersion 16 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support.constraint:constraint-layout:1.0.2' compile 'com.firebaseui:firebase-ui-auth:2.3.0' testCompile 'junit:junit:4.12' } configurations.all { resolutionStrategy { force 'com.android.support:appcompat-v7:26.0.1' force 'com.android.support:support-compat:26.0.1' force 'com.android.support:support-core-ui:26.0.1' force 'com.android.support:support-annotations:26.0.1' force 'com.android.support:recyclerview-v7:26.0.1' } } apply plugin: 'com.google.gms.google-services' any solutions Edit: i have done with sample through firebase github site and solved
For Cordova based project, run cordova clean android before build again, as #mkimmet suggested.
This error happens when you add an external library which may not be compatible with your compileSdkVersion . Be careful when you are adding an external library. I spent 2 days on this problem and finally it got solved following these steps. Make sure all your support libraries are same as compileSdkVersion of your build.gradle(Module:app) in my case it is 26. In your defaultConfig category type multiDexEnabled true. This is the important part. Go to File | Settings | Build, Execution, Deployment | Instant Run and try to Enable/Disable Instant Run to hot swap... and click okay Sync Your project. Lastly, Go to Build | click on Rebuild Project. Note: Rebuild Project first cleans and then builds the project.
Try to add this in gradle android { defaultConfig { multiDexEnabled true } }
Resolution: Refer to this link: As there are various options to shut the warning off depending on the minSdkVersion, it is set below 20: android { defaultConfig { ... minSdkVersion 15 targetSdkVersion 26 multiDexEnabled true } ... } dependencies { compile 'com.android.support:multidex:1.0.3' } If you have a minSdkVersion greater than 20 in your build.gradle set use the following to shut down the warning: android { defaultConfig { ... minSdkVersion 21 targetSdkVersion 26 multiDexEnabled true } ... } Update dependencies as follows: dependencies { implementation 'com.android.support:multidex:1.0.3' } Again the only difference is the keywords in dependencies: minSdkVersion below 20: use compile minSdkVersion above 20: use implementation I hope this was helpful, please upvote if it solved your issue, Thank you for your time. Also for more info, on why this occurs, please read the first paragraph in the link, it will explain thoroughly why? and what does this warning mean.
Simply try doing a "Build -> Clean Project". That solved the problem for me.
For me, adding multiDexEnabled true and packagingOptions { exclude 'META-INF/NOTICE' exclude 'META-INF/LICENSE' exclude 'META-INF/notice' exclude 'META-INF/notice.txt' exclude 'META-INF/license' exclude 'META-INF/license.txt' } into the app level Build.gradle file solved the issue
Go to your module level build.gradle file and add the following lines to the code defaultConfig { ... minSdkVersion 15 targetSdkVersion 28 multiDexEnabled true } ... } dependencies { implementation 'com.android.support:multidex:1.0.3' } That solved the problem easily. Check this documentation
Use multiDexEnabled true as below. { minSdkVersion 17 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true } and implementation 'com.android.support:multidex:1.0.3' this Solution worked for me.
I tried many solutions as mentioned above including the multiDexEnabled true but none of that worked for me. Here is the solution which worked for me - copy this code in app\build.gradle file configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == 'com.android.support' && requested.name != 'multidex') { details.useVersion "${rootProject.ext.supportLibVersion}" } } } Make sure to run gradlew clean before running the code
Same thing happened to me, figured out that I was in the middle of updating to AS 3.0.1 and after I did the update, cleaned and rebuilt the app, everything was fixed.
For me what fixed this error was changing one line in my app's gradle dependencies. from this: compile('com.google.android.gms:play-services-gcm:+') { force = true } To this: compile('com.google.android.gms:play-services-gcm:11.8.0') { force = true }
Also be sure your app is subclassing MultiDexApplication import android.support.multidex.MultiDexApplication class App : MultiDexApplication() or if not subclassing Application class, add to AndroidManifest.xml <application android:name="android.support.multidex.MultiDexApplication"
This is what works for me. clean prepare and run. cordova clean android; ionic cordova prepare andriod; ionic cordova run andriod; hope it helps.
I also got the similar error. Problem : Solution : Main root cause for this issue ismultiDex is not enabled. So in the Project/android/app/build.gradle, enable the multiDex For further information refer the documentation: https://developer.android.com/studio/build/multidex#mdex-gradle
Are you in between SDK or platform updates? If yes complete those completely and then try to continue. I normally update the individual packages that need to be updated as to taking the entire update which could go up to 2.5 GB sometimes. Doing this complete update sometimes fails. I had a number of SDK updates once I upgraded to Android Studio 3.0 and was getting the above error since all packages had not been updated. Once I updated all packages the above error was gone.
In my case changing firebase library version from 2.6.0 to 2.4.2 fixed the issue
For me, the problem was the use of Java 1.8 in a module, but not in the app module. I added this to the app build gradle and worked: android{ compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 }
Same problem. I have enabled multidex: defaultConfig { applicationId "xxx.xxx.xxxx" minSdkVersion 24 targetSdkVersion 26 multiDexEnabled true I have cleared cache, ran gradle clean, rebuild, make, tried to make sure no conflicts in imported libraries (Removed all transitive dependencies) and made all updates. Still: Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex Turns out the build did not like: implementation 'org.slf4j:slf4j-android:1.7.21'
When the version of Android Studio is 3.0.1, Gradle Version is 4.1 and Android PluginVersion is 3.0.0, it will encounter this problem. Then I downgrade Gradle Version is 3.3, Android Android is zero, there is no such problem.
I had this when requested SDK version didn't match the dependencies. You can click the line highlighted and fix this clicking the red light bulb. No need to find the actual version, just let the IDE figure it out for you. And add google repo to maven config.
I was receiving the same error and in my case, the error was resolved when I fixed a build error which was associated with a different build variant than the one I was currently building. I was building the build variant I was looking at just fine with no errors, but attempting to debug caused a app:transformDexArchiveWithExternalLibsDexMergerForDebug error. Once I switched to build the other build variant, I caught my error in the build process and fixed it. This seemed to resolve my app:transformDexArchiveWithExternalLibsDexMergerForDebug issue for all build variants. Note that this error wasn't within the referenced external module but within a distinct source set of a build variant which referenced an external module. Hope that's helpful to someone who may be seeing the same case as me!
I Have Done and fixed this issue by just doing this jobs in my code Open ->build.gradle Change value from compile 'com.google.code.gson:gson:2.6.1' to compile 'com.google.code.gson:gson:2.8.2'
1)Please add multiDexEnabled true 2)if you get compilation error then check your app level build.gradle weather same dependencies are implemented with different versions. 3)Remove one if you find same dependencies. android { compileSdkVersion 28 defaultConfig { minSdkVersion 17 targetSdkVersion 28 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" multiDexEnabled true } hope it works fine :) Happy Coding
The easiest way to avoid suck kind of error is: -Change library combilesdkversion as same as your app compilesdkversion -Change library's supportLibrary version as same as your build.gradle(app)
Dagger 2 : Cannot resolve symbol for dagger component
I would like to exercise this Dagger 2 Vehicle Motor example. I made everything exact like in that tutorial, except for my gradel.build: compile 'com.google.dagger:dagger:2.4' apt 'com.google.dagger:dagger-compiler:2.4' compile 'javax.annotation:javax.annotation-api:1.2' but then I get an error: cannot find symbol variable Dagger_VehicleComponent Whats wrong there? (Same without '_' underscore)
Another version solved it: compile 'com.google.dagger:dagger:2.2' apt 'com.google.dagger:dagger-compiler:2.2' provided 'javax.annotation:jsr250-api:1.0'
Change Dagger_VehicleComponent with DaggerVehicleComponent Clean and rebuild your project Import DaggerVehicleComponent class
Took me a while to figure this out. But I found the reason (At least on my side) I created a project from scratch, after that I was trying to set up the basic components/tools till I bump into this issue. Reading other answers I found that DaggerApplicationComponent class is autogenerated by the compiler, then I thought, why the IDE can't "find" this class? The answer is obvious and... you got it, was because the project wasn't compiling, here are the steps to solve this issue if the scenario is the same as mine. 1) Open terminal and go to your projects path (Or simply open the terminal in the Android Studio) 2) Clean project ./gradlew clean 3) Build the project ./gradlew build NOTE: If by this point you have noticed the project is not compiling... Bingo! That might be the real issue. Then follow the next steps: 4)Open gradle and add the buildToolsVersion '23.0.1' and very IMPORTANT has to be enabled multiDexEnabled true This is how my gradle in the app module looks like android { buildToolsVersion '23.0.1' // IMPORTANT compileSdkVersion 26 defaultConfig { applicationId "com.fixing.dagger" minSdkVersion 23 targetSdkVersion 26 versionCode 1 versionName "1.0" multiDexEnabled true // ALSO IMPORTANT } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } After that you will be able to import the DaggerApplicationComponent. Hope this saves time for someone else!
Using data-binding in android error: package *.*.databinding does not exist
I'm trying to implement data-binding in android app. This is the link I'm following to set it up. Even after doing all the necessary implements, I'm getting the following error in gradle-build: error: package com.example.satpracticeapp.databinding does not exist. (This package is what I'm importing in my MainActivity.java file) I tried this (the data-binding compiler), but it didn't work. The problem is I've already successfully tried a hello-world app using data-binding and it works. But, when I try to implement it in an app I made a few weeks ago, I get the error I mentioned above. Searching for the solutions, I copy-pasted the gradle files from my successful hello world app to my old app - that too didn't work out. Here is my app level build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.example.satpracticeapp" minSdkVersion 16 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } dataBinding { enabled = true } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:23.1.1' compile 'com.android.support:design:23.1.0' } And here's the buildscript of the project level build.gradle file: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' } } Here are the links to the minimal version of the three files (if it's needed) MainActivity.java ViewModel.java activity_main.xml After much hair-pulling, I couldn't figure out the solution and getting the same build error again and again. So, as a temporary solution, I'm trying to copy-paste my classes and layouts in the working hello world project. What am I missing? EDIT: After a few hours of pointless searching, I went back to my code. Checked it word by word and found a typing mistake at the name of a binding variable in the xml file. Everything works fine now!
I had the same issue, turned out to be a duplicate symbol declaration in one of my *.java classes. It's shown in the Gradle console but it was kinda hidden among the databinding errors. i had about 72 data binding errors and this duplicate symbol error was in the middle so it's easy to miss.
Building app with library module cannot find AndroidManifest.xml
I want to build an Android App with AndroidAnnotations. Here is a simplified version on GitHub which fails to build/pre-process: https://github.com/aiQon/androidannotationsexample The app is composed of a main app module and a library module. Both use AndroidAnnotations (AA). The lib module has a workaround to find the AndroidManifest.xml in debug builds (it refers to the release manifest, because gradle does not build the debug variant for libs). However, the manifest is found for the library module but not for the main app. The gradle file of the main app is: apply plugin: 'com.android.application' apply plugin: 'android-apt' buildscript { repositories { mavenLocal() mavenCentral() } dependencies { classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' } } android { compileSdkVersion 21 buildToolsVersion "21.0.1" defaultConfig { applicationId "de.stelle_beratung.androidannotationslibraryexample" minSdkVersion 15 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } apt { arguments { androidManifestFile variant.outputs.processResources.manifestFile resourcePackageName android.defaultConfig.applicationId } } dependencies { compile project(":mylibrary") apt "org.androidannotations:androidannotations:3.2+" compile 'org.androidannotations:androidannotations-api:3.2+' } Gradle complains with: http://pastebin.com/QZtnHcZD Could someone please point me in the right direction on how to build this simplified project to have a controller Bean in the lib module and reference it successfully in the main app activity by using AA? I appreciate any help.
Since android gradle plugin 14.4, the following line does not work anymore: variant.outputs.processResources.manifestFile orvariant.processResources.manifestFile You have to use this one instead: variant.outputs[0].processResources.manifestFile Please note if you have multiple outputs (when using splits), you may want to use another output (other index than zero).
Ok I got it. Was using Android Studio from the Canary Channel. Going back to Beta solved the issue because I could use android gradle plugin 0.12.2. This solved everything.