2

I'm having this issue with Android Studio 3.0 beta 2 where it basically does not resolve anything inside my Manifest.xml

This is how the LogCat looks like when trying to run the app:

> Error:(60) unknown element <action> found
Error:(66) unknown element <action> found
Error:(71) unknown element <action> found
Error:(76) unknown element <action> found
Error:(81) unknown element <action> found
Error:(86) unknown element <action> found
Error:(91) unknown element <action> found
Error:(96) unknown element <action> found
Error:/Users/daniele/Developer/Android Projects/Chords2/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:60 unknown element <action> found
Error:/Users/daniele/Developer/Android Projects/Chords2/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:71 unknown element <action> found
Error:/Users/daniele/Developer/Android Projects/Chords2/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:81 unknown element <action> found
Error:/Users/daniele/Developer/Android Projects/Chords2/app/build/intermediates/manifests/full/debug/AndroidManifest.xml:91 unknown element <action> found
Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.AaptException: AAPT2 link failed:
Error:com.android.builder.internal.aapt.AaptException: AAPT2 link failed:

This is how my app build.gradle looks like:

apply plugin: 'com.android.application'

android {
    signingConfigs {
        ######_key {
            keyAlias '######'
            keyPassword '######'
            storeFile file('#######.jks')
            storePassword '######'
        }
    }
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    defaultConfig {
        applicationId "######"
        minSdkVersion 21
        targetSdkVersion 26
        versionCode 16
        versionName "2.1"
        signingConfig ######
        multiDexEnabled true
    }
    buildTypes {
        release {
            shrinkResources true
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    productFlavors {
    }

    dataBinding {
        enabled = true
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.0.1'
    compile 'com.android.support:support-v4:26.0.1'
    compile 'com.android.support:design:26.0.1'
    compile 'com.android.support:recyclerview-v7:26.0.1'
    compile 'com.android.support:cardview-v7:26.0.1'
    compile 'com.getbase:floatingactionbutton:1.10.1'
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile 'com.github.hotchemi:android-rate:1.0.1'
    compile 'com.google.firebase:firebase-ads:11.2.0'
    compile 'com.google.firebase:firebase-invites:11.2.0'
    compile 'com.google.firebase:firebase-crash:11.2.0'
    compile 'com.google.firebase:firebase-storage:11.2.0'
    compile 'com.heinrichreimersoftware:material-intro:1.6.2'
    testCompile 'junit:junit:4.12'
}

apply plugin: 'com.google.gms.google-services'

I have ### out the data regarding my signing key. To me it looks alright.

I also tried cleaning, rebuilding, resyncing the gradle file, Still no luck though.

This is a logcat screenshot. Maybe it's more readable

error

Based on MikeM suggestion I tried this answer and changed in gradle-wrapper.properties

distributionUrl=https://services.gradle.org/distributions/gradle-4.1-rc-2-all.zip

The error is still there though

Daniele
  • 4,163
  • 7
  • 44
  • 95
  • please share Manifest file code? – Harshit Trivedi Aug 21 '17 at 09:15
  • There's for sure nothing wrong in the manifest. It's compiling fine in android studio 2 – Daniele Aug 21 '17 at 09:29
  • Thanks Mike, will try this out – Daniele Aug 21 '17 at 10:19
  • @MikeM. I've changed from `rc1` to `rc2` still the error is there. – Daniele Aug 21 '17 at 10:27
  • I had forgotten about this question, until I just came across it searching my history. I'm not sure if you ever solved this, but your problem is misplaced tags in the manifest. The older tools would just ignore them, but the newer ones throw that error. `` elements must be inside `` elements. Since they were just being ignored previously, you can simply delete the ones on the lines specified in those error messages. – Mike M. Nov 30 '17 at 22:57
  • @MikeM. Why is this question been marked as duplicate it's been asked in August and the "duplicate" one was asked in October, shouldn't the other one be marked as duplicate? – Daniele Dec 02 '17 at 18:49
  • 1
    The purpose of marking questions as duplicates is to link to the correct answers. The dates don't matter, though the phrasing in that banner is slightly misleading. – Mike M. Dec 02 '17 at 18:56

2 Answers2

2

Updating the gradle version or downgrading it didn't resolved the issue

I have got the similar issue recently, The way I solved is by invalidating the cache. You can do that in android studio-> File-> Invalidate cache/ Restart.

After that it stop showing me those ActivityFeed error.

Nikunj Sakhrelia
  • 449
  • 3
  • 12
0

For me what helped was to modify the classpath in dependencies of the build.gradle file of the project.

    dependencies {
        classpath 'com.android.tools.build:gradle:2.3.0'
    }