0

Comecei a receber esse erro depois de criar minhas classes com Android Annotations e rodar o projeto no emulador.

Este é meu gradddle Project

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'

        classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'

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

repositories {
    mavenCentral()
    mavenLocal()
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Meu graddle Module:app

apply plugin: 'com.android.application'
def AAVersion = '4.2.0'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.asuscomputer.surf"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation 'com.android.support:support-annotations:28.0.0'

    annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
    implementation "org.androidannotations:androidannotations-api:$AAVersion"
}

E aqui é meu AndroidMannifest

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

    <uses-permission android:name="android.permission.INTERNET" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        tools:ignore="GoogleAppIndexingWarning">

        <activity android:name=".Login_">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

        <activity android:name=".Inicial_" />

        <activity android:name=".EsqueceuSenha_" />

    </application>

</manifest>

Alguma ideia do que está acontecendo de errado? O projeto dá Syn normalmente mas na hora de dar build recebo esse erro no :app:compileDebugJavawithJavac

org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details

e esse no JavaCompiler

error: Could not find the AndroidManifest.xml file, using generation folder [C:\Users\Asusc\AndroidStudioProjects\Surf\app\build\generated\source\apt\debug])

1 Resposta 1

-1

adicione esse código ao gradle

android {
   ...
   defaultConfig {
       ...
       javaCompileOptions {
            annotationProcessorOptions {
            arguments = ["androidManifestFile": "$projectDir/src/main/AndroidManifest.xml".toString()]
            }
        }
    }
}

Você deve fazer log-in para responder a esta pergunta.

Esta não é a resposta que você está procurando? Pesquise outras perguntas com a tag .