我在Android Studio 3.0 beta 2中遇到此问题,它基本上无法解决Manifest.xml
这是尝试运行应用程序时LogCat的样子:
> 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:
这就是我的应用build.gradle
的样子:
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'
我有###了解有关我的签名密钥的数据。 对我而言看起来还不错。
我也尝试过清理,重建,重新同步gradle文件,但仍然没有运气。
这是一个logcat截图。也许它更具可读性
根据MikeM的建议,我尝试了this answer并在gradle-wrapper.properties
distributionUrl=https://services.gradle.org/distributions/gradle-4.1-rc-2-all.zip
虽然错误仍然存在
答案 0 :(得分:2)
更新gradle版本或降级它并没有解决问题
我最近遇到了类似的问题,我解决的方法是使缓存无效。你可以在android studio-&gt;中做到这一点。文件 - &GT;无效缓存/重新启动。
之后它停止向我显示那些ActivityFeed错误。
答案 1 :(得分:0)
对我来说,修改项目build.gradle文件依赖项中的类路径是有帮助的。
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
}