Android, Gradle, Realm, Kotlin: Error:error: Could not find the AndroidManifest.xml file -


android studio 2.3.3, java 8, kotlin 1.1.3-2

project's build.gradle:

// top-level build file can add configuration options common sub-projects/modules.  buildscript {     ext.kotlin_version = '1.1.3-2'     repositories {         jcenter()     }     dependencies {         classpath 'com.android.tools.build:gradle:2.3.3'         classpath 'com.google.gms:google-services:2.0.0-alpha6'         classpath "io.realm:realm-gradle-plugin:3.5.0"         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"         // note: not place application dependencies here; belong         // in individual module build.gradle files     } }  allprojects {     repositories {         jcenter()         maven { url 'https://dl.bintray.com/jetbrains/anko' }     } }  task clean(type: delete) {     delete rootproject.builddir } repositories {     mavencentral() } 

app's build.gradle:

buildscript {     repositories {         maven { url 'https://maven.fabric.io/public' }         mavencentral()     }      dependencies {         classpath 'io.fabric.tools:gradle:1.+'         classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'     } } apply plugin: 'com.android.application' apply plugin: 'com.neenbedankt.android-apt' apply plugin: 'kotlin-android' apply plugin: 'kotlin-kapt' apply plugin: 'io.fabric' apply plugin: 'realm-android'  //apply plugin: 'com.google.gms.google-services'  repositories {     maven { url 'https://maven.fabric.io/public' }     mavencentral() }  android {     compilesdkversion 25     buildtoolsversion "25.0.0"     dexoptions {         jumbomode = true     }      defaultconfig {         applicationid "com.myproject"         minsdkversion 15         targetsdkversion 23         versioncode 53         versionname "1.17.53"          apt {             arguments {                 arg('androidmanifestfile', variant.outputs[0]?.processresources?.manifestfile)                 arg('resourcepackagename', android.defaultconfig.applicationid)             }         }     }      // exclude buildtypes = "debug" build variants     variantfilter { variant ->         if (variant.buildtype.name.equals('debug')) {             variant.setignore(true);         }     }      buildtypes {         def app_name_stage = "my project stage"         def app_id_suffix_stage = ".stage"          release {             minifyenabled false             proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         }         stage {             initwith(debug)         }     }      sourcesets {         main.java.srcdirs += 'src/main/kotlin'     }     packagingoptions {         exclude 'meta-inf/dependencies'         exclude 'meta-inf/notice'         exclude 'meta-inf/license'         exclude 'meta-inf/license.txt'         exclude 'meta-inf/notice.txt'     }      lintoptions {         abortonerror false     } }  def aaversion = '4.3.0'  dependencies {     compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"     compile('com.digits.sdk.android:digits:1.11.0@aar') {         transitive = true;     }     compile('com.crashlytics.sdk.android:crashlytics:2.6.0@aar') {         transitive = true;     }     compile 'com.android.support:appcompat-v7:23.0.0'     compile 'com.android.support.constraint:constraint-layout:1.0.2'     compile 'com.android.volley:volley:1.0.0'     compile 'com.baoyz.swipemenulistview:library:1.3.0'     compile 'com.google.android.gms:play-services-gcm:9.0.2'     compile 'com.google.code.gson:gson:2.7'     compile 'com.miguelcatalan:materialsearchview:1.4.0'     compile 'com.squareup.okhttp:okhttp-urlconnection:2.7.3'     compile 'com.squareup.okhttp:okhttp:2.7.3'     compile 'com.theartofdev.edmodo:android-image-cropper:2.2.5'     compile 'commons-codec:commons-codec:1.9'     compile 'commons-io:commons-io:2.4'     compile 'org.apache.commons:commons-lang3:3.4'     compile 'org.apache.httpcomponents:httpcore:4.4.4'     compile 'org.apache.httpcomponents:httpmime:4.3.6'     compile 'us.feras.mdv:markdownview:1.1.0'     compile filetree(dir: 'libs', include: ['*.jar'])     compile project(':module_1')     compile project(':module_2')     compile 'org.jetbrains.anko:anko-sdk15:0.9.1'     kapt "org.androidannotations:androidannotations:$aaversion"     compile "org.androidannotations:androidannotations-api:$aaversion"     testcompile 'junit:junit:4.12' } 

but when try build proejct, error:

error:error: not find androidmanifest.xml file, using  generation folder [myproject\app\build\generated\source\kapt\stage])   java.lang.illegalstateexception: failed analyze: org.jetbrains.kotlin.kapt3.diagnostic.kapterror: error while annotation processing     @ org.jetbrains.kotlin.analyzer.analysisresult.throwiferror(analysisresult.kt:57)     @ org.jetbrains.kotlin.cli.jvm.compiler.kotlintojvmbytecodecompiler.compilemodules(kotlintojvmbytecodecompiler.kt:144)     @ org.jetbrains.kotlin.cli.jvm.k2jvmcompiler.doexecute(k2jvmcompiler.kt:167)     @ org.jetbrains.kotlin.cli.jvm.k2jvmcompiler.doexecute(k2jvmcompiler.kt:55)     @ org.jetbrains.kotlin.cli.common.clicompiler.exec(clicompiler.java:182)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.execcompiler(compileserviceimpl.kt:397)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.access$execcompiler(compileserviceimpl.kt:99)     @ org.jetbrains.kotlin.daemon.compileserviceimpl$compile$1$2.invoke(compileserviceimpl.kt:365)     @ org.jetbrains.kotlin.daemon.compileserviceimpl$compile$1$2.invoke(compileserviceimpl.kt:99)     @ org.jetbrains.kotlin.daemon.compileserviceimpl$docompile$2$$special$$inlined$withvalidclientorsessionproxy$lambda$1.invoke(compileserviceimpl.kt:798)     @ org.jetbrains.kotlin.daemon.compileserviceimpl$docompile$2$$special$$inlined$withvalidclientorsessionproxy$lambda$1.invoke(compileserviceimpl.kt:99)     @ org.jetbrains.kotlin.daemon.common.dummyprofiler.withmeasure(perfutils.kt:137)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.checkedcompile(compileserviceimpl.kt:825)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.access$checkedcompile(compileserviceimpl.kt:99)     @ org.jetbrains.kotlin.daemon.compileserviceimpl$docompile$2.invoke(compileserviceimpl.kt:797)     @ org.jetbrains.kotlin.daemon.compileserviceimpl$docompile$2.invoke(compileserviceimpl.kt:99)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.ifalive(compileserviceimpl.kt:1004)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.ifalive$default(compileserviceimpl.kt:865)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.docompile(compileserviceimpl.kt:791)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.access$docompile(compileserviceimpl.kt:99)     @ org.jetbrains.kotlin.daemon.compileserviceimpl$compile$1.invoke(compileserviceimpl.kt:364)     @ org.jetbrains.kotlin.daemon.compileserviceimpl$compile$1.invoke(compileserviceimpl.kt:99)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.ifalive(compileserviceimpl.kt:1004)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.ifalive$default(compileserviceimpl.kt:865)     @ org.jetbrains.kotlin.daemon.compileserviceimpl.compile(compileserviceimpl.kt:336)     @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)     @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62)     @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)     @ java.lang.reflect.method.invoke(method.java:498)     @ sun.rmi.server.unicastserverref.dispatch(unicastserverref.java:324)     @ sun.rmi.transport.transport$1.run(transport.java:200)     @ sun.rmi.transport.transport$1.run(transport.java:197)     @ java.security.accesscontroller.doprivileged(native method)     @ sun.rmi.transport.transport.servicecall(transport.java:196)     @ sun.rmi.transport.tcp.tcptransport.handlemessages(tcptransport.java:568)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run0(tcptransport.java:826)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.lambda$run$0(tcptransport.java:683)     @ java.security.accesscontroller.doprivileged(native method)     @ sun.rmi.transport.tcp.tcptransport$connectionhandler.run(tcptransport.java:682)     @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1142)     @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:617)     @ java.lang.thread.run(thread.java:745) caused by: org.jetbrains.kotlin.kapt3.diagnostic.kapterror: error while annotation processing     @ org.jetbrains.kotlin.kapt3.annotationprocessingkt.doannotationprocessing(annotationprocessing.kt:90)     @ org.jetbrains.kotlin.kapt3.annotationprocessingkt.doannotationprocessing$default(annotationprocessing.kt:42)     @ org.jetbrains.kotlin.kapt3.abstractkapt3extension.runannotationprocessing(kapt3extension.kt:205)     @ org.jetbrains.kotlin.kapt3.abstractkapt3extension.analysiscompleted(kapt3extension.kt:166)     @ org.jetbrains.kotlin.kapt3.classpathbasedkapt3extension.analysiscompleted(kapt3extension.kt:82)     @ org.jetbrains.kotlin.resolve.jvm.topdownanalyzerfacadeforjvm$analyzefileswithjavaintegration$2.invoke(topdownanalyzerfacadeforjvm.kt:89)     @ org.jetbrains.kotlin.resolve.jvm.topdownanalyzerfacadeforjvm.analyzefileswithjavaintegration(topdownanalyzerfacadeforjvm.kt:99)     @ org.jetbrains.kotlin.resolve.jvm.topdownanalyzerfacadeforjvm.analyzefileswithjavaintegration$default(topdownanalyzerfacadeforjvm.kt:76)     @ org.jetbrains.kotlin.cli.jvm.compiler.kotlintojvmbytecodecompiler$analyze$1.analyze(kotlintojvmbytecodecompiler.kt:365)     @ org.jetbrains.kotlin.cli.common.messages.analyzerwithcompilerreport.analyzeandreport(analyzerwithcompilerreport.kt:105)     @ org.jetbrains.kotlin.cli.jvm.compiler.kotlintojvmbytecodecompiler.analyze(kotlintojvmbytecodecompiler.kt:354)     @ org.jetbrains.kotlin.cli.jvm.compiler.kotlintojvmbytecodecompiler.compilemodules(kotlintojvmbytecodecompiler.kt:139) 

per the documenation...

if used android-apt plugin, remove build.gradle file , replace usages of apt configuration kapt. if project contains java classes, kapt take care of them.

i don't know if solve problem, see using apt in gradle script. give shot.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -