什么可能导致错误:找不到AndroidManifest.xml文件?

问题描述 投票:0回答:1

错误:

error: Could not find the AndroidManifest.xml file, using  generation folder [C:\Users\valentin\Documents\work\aswaq\Android\Aswaq\utils\build\generated\source\apt\debug])

它一直有效,直到我做了更新(不记得什么更新)“清理构建”和“使项目无效并重新启动”不起作用。

我使用多种模块和一些模块,这里是Gradle文件:build.gradle(app):

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'

android {

    dexOptions {
        javaMaxHeapSize "4g"
    }

    compileSdkVersion 28
    buildToolsVersion '27.0.3'
    useLibrary 'org.apache.http.legacy'

    defaultConfig {
        applicationId "thinkit.aswaq"
        vectorDrawables.useSupportLibrary = true
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 146
        versionName "1.66"
        multiDexEnabled true
        javaCompileOptions {
            annotationProcessorOptions {
                arguments = ['resourcePackageName': android.defaultConfig.applicationId]
            }
        }
    }
    signingConfigs {
        debug {
            storeFile file("debug.keystore")
        }
        release {
            storeFile file("***********")
            storePassword "***********"
            keyAlias "***********"
            keyPassword "***********"
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            // proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.release
        }
        debug {
            minifyEnabled false
            signingConfig signingConfigs.debug
            debuggable true
        }
        applicationVariants.all { variant ->
            variant.outputs.all { output ->
                outputFileName = "${variant.flavorName}-${variant.versionName}.apk"
            }
        }
    }
    flavorDimensions "app", "target"

    productFlavors {
        aswaqnet {
            dimension "target"
            buildConfigField 'String', 'aswaqServerName', '"www.aswaq.net"'
            buildConfigField 'String', 'quickPayServerName', '"www.aswaq.net"'
        }
        sandbox {
            dimension "target"
            buildConfigField 'String', 'aswaqServerName', '"sbox.aswaq.net"'
            buildConfigField 'String', 'quickPayServerName', '"sbox.aswaq.net"'
        }
        aswaq {
            dimension "app"
            applicationId "thinkit.aswaq"
        }
        qp {
            dimension "app"
            applicationId "thinkit.quickpay"
        }
        auctions {
            dimension "app"
            applicationId "thinkit.aswaq.auctions"
        }
//      rt_ads {
//          dimension "app"
//          applicationId "thinkit.aswaq.rt_ads"
//      }
//      rt_auctions {
//          dimension "app"
//          applicationId "thinkit.aswaq.rt_auctions"
//      }
//      rt_mixed {
//          dimension "app"
//          applicationId "thinkit.aswaq.rt_shop"
//      }
        cupcakes {
            dimension "app"
            applicationId "thinkit.cupcakes"
        }
        autoclub {
            dimension "app"
            applicationId "thinkit.autoclub"
        }
        gosell {
            dimension "app"
            applicationId "thinkit.gosell"
        }
        jarrar {
            dimension "app"
            applicationId "thinkit.jarrar"
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
    lintOptions {
        abortOnError false
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}


dependencies {
    compile 'com.github.deano2390:MaterialShowcaseView:1.2.0'
    annotationProcessor "org.androidannotations:androidannotations:4.4.0"
    annotationProcessor "org.androidannotations:otto:4.4.0"
    compile 'org.androidannotations:androidannotations-api:4.4.0'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:design:28'
    compile 'com.android.support:support-v4:28.0.0-alpha3'
    compile 'com.android.support:appcompat-v7:28.0.0-alpha3'
    compile 'com.android.support:recyclerview-v7:28.0.0-alpha3'
    compile 'com.google.android.gms:play-services-base:15.0.1'
    compile 'com.google.firebase:firebase-messaging:17.1.0'
    compile 'com.makeramen:roundedimageview:2.3.0'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile 'com.squareup:otto:1.3.8'
    compile 'joda-time:joda-time:2.9.9'
    compile 'android.lib.recaptcha:reCAPTCHA:2.0.0'
    compile 'me.leolin:ShortcutBadger:1.1.21@aar'
    compile project(':aswaq communication')
    compile project(':utils')
    compile 'com.android.support.constraint:constraint-layout:1.1.2'
    compile 'com.google.android.gms:play-services-safetynet:15.0.1'
    compile 'com.android.support:multidex:1.0.3'
    compile 'com.synnapps:carouselview:0.1.4'
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

apply plugin: 'com.google.gms.google-services'
repositories {
    mavenCentral()
}

build.gradle(aswaq通信):

apply plugin: 'com.android.library'

android {
    compileSdkVersion 27

    dexOptions {
        javaMaxHeapSize "4g"
    }

    compileSdkVersion 28
    buildToolsVersion '27.0.3'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        debug {
            minifyEnabled false
        }
        release {
            minifyEnabled false
//          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    productFlavors {
    }
}

def AAVersion = '4.4.0'

dependencies {
    annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
    annotationProcessor "org.androidannotations:otto:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"
    provided 'org.glassfish:javax.annotation:10.0-b28'
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    testCompile 'org.json:json:20160810'
    compile 'com.android.support:support-v4:28.0.0-alpha3'
    compile 'com.android.support:appcompat-v7:28.0.0-alpha3'
    compile 'com.android.support:recyclerview-v7:28.0.0-alpha3'
    compile project(':utils')
    // https://mvnrepository.com/artifact/com.google.code.gson/gson
    compile 'com.google.code.gson:gson:2.8.5'
    compile('org.apache.thrift:libthrift:0.11.0') {
        exclude group: 'org.apache.httpcomponents'
    }
}

的build.gradle(utils的)

apply plugin: 'com.android.library'

android {
    compileSdkVersion 28
    buildToolsVersion '27.0.3'

    defaultConfig {
        minSdkVersion 14
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        debug {
            minifyEnabled false
        }
        release {
            minifyEnabled false
//          proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

def AAVersion = '4.4.0'

dependencies {
    annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
    annotationProcessor "org.androidannotations:otto:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'org.apache.commons:commons-lang3:3.7'
    compile 'commons-io:commons-io:2.5'
    compile 'org.slf4j:slf4j-api:1.7.25'
    compile 'com.github.tony19:logback-android-core:1.1.1-6'
    compile('com.github.tony19:logback-android-classic:1.1.1-6') {
        exclude group: 'com.google.android', module: 'android'
    }
    compile 'joda-time:joda-time:2.9.9'
    compile 'android.lib.recaptcha:reCAPTCHA:2.0.0'
    compile 'com.android.support:support-v4:28.0.0-alpha3'
    compile 'com.android.support:appcompat-v7:28.0.0-alpha3'
    compile 'com.android.support:recyclerview-v7:28.0.0-alpha3'
    compile 'com.android.support:design:28.0.0-alpha3'
    compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
    compile 'com.squareup:otto:1.3.8'
    compile 'com.google.android.gms:play-services-base:15.0.1'
    compile 'com.caverock:androidsvg:1.2.1'
}

的build.gradle(项目)

buildscript {
    ext.kotlin_version = '1.2.51'
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha03'
        classpath 'com.google.gms:google-services:4.0.1'
        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}


allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
        google()
    }
}

AndroidManifest(app)

<?xml version="1.0" encoding="utf-8"?>
<manifest
    package="thinkit.aswaq"
    xmlns:android="http://schemas.android.com/apk/res/android">

    <!-- READ_EXTERNAL_STORAGE - for reading selected pictures -->
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <!-- WRITE_EXTERNAL_STORAGE - for saving log files -->
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>

    <application
        android:name=".AswaqApp_"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">


        <activity
            android:name=".MainActivity_"
            android:label="@string/app_name"
            android:launchMode="singleTop"
            android:windowSoftInputMode="stateHidden|adjustResize">
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>

                <data
                    android:host="aswaq.se"
                    android:pathPrefix="/ad/"
                    android:scheme="http"/>
            </intent-filter>
            <intent-filter>
                <action android:name="android.intent.action.VIEW"/>

                <category android:name="android.intent.category.DEFAULT"/>
                <category android:name="android.intent.category.BROWSABLE"/>

                <data
                    android:host="www.aswaq.se"
                    android:pathPrefix="/ad/"
                    android:scheme="http"/>
            </intent-filter>
        </activity>

        <activity
            android:name="thinkit.quickpay.reports.ReportViewActivity_"
            android:label="@string/report"/>

        <activity
            android:name="thinkit.quickpay.QuickPayMain_"
            android:label="@string/qp_title"
            android:launchMode="singleTop"
            android:windowSoftInputMode="stateHidden|adjustResize"/>

        <activity-alias
            android:name=".Launcher"
            android:targetActivity=".MainActivity_">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity-alias>


        <service
            android:name=".notifications.PushNotificationListenerService_"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.MESSAGING_EVENT"/>
            </intent-filter>
        </service>
        <service
            android:name=".notifications.PushNotificationInstanceIDListenerService_"
            android:exported="false">
            <intent-filter>
                <action android:name="com.google.firebase.INSTANCE_ID_EVENT"/>
            </intent-filter>
        </service>

        <receiver android:name=".receivers.BootCompletedReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED"/>
            </intent-filter>
        </receiver>
        <receiver android:name=".reminders.CheckRemindersAlarmReceiver_"/>


    </application>

</manifest>
java android android-gradle build.gradle android-annotations
1个回答
1
投票

升级到AndroidAnnotations 4.6.0,现在支持Android Gradle Plugin 3.3.0。

© www.soinside.com 2019 - 2024. All rights reserved.