【问题标题】:aapt and :app:processDebugRecources errorsaapt 和 :app:processDebugRecources 错误
【发布时间】:2017-11-18 17:50:25
【问题描述】:

我遇到了 aapt 和 :app:processDebugRecources 的问题。我怎样才能让这些错误消失?我确实只在 build.gradle 中添加了 compile 'madgaze.x5_gesture:development-kit:1.1.7.beta'。项目中的所有其他内容均未触及

这是我的 build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion "Google Inc.:Glass Development Kit Preview:19"
    buildToolsVersion "27.0.1"
    defaultConfig {
        applicationId "com.example.minttu.qr_codereader"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}


dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    compile 'madgaze.x5_gesture:development-kit:1.1.7.beta'
}

这是我得到的所有错误:

Error:resource android:style/TextAppearance.Material not found.
Error:resource android:style/TextAppearance.Material.Body1 not found.
Error:resource android:style/TextAppearance.Material.Body2 not found.
Error:resource android:style/TextAppearance.Material.Button not found.
Error:resource android:style/TextAppearance.Material.Caption not found.
Error:resource android:style/TextAppearance.Material.Display1 not found.
Error:resource android:style/TextAppearance.Material.Display2 not found.
Error:resource android:style/TextAppearance.Material.Display3 not found.
Error:resource android:style/TextAppearance.Material.Display4 not found.
Error:resource android:style/TextAppearance.Material.Headline not found.
Error:resource android:style/TextAppearance.Material.Inverse not found.
Error:resource android:style/TextAppearance.Material.Large not found.
Error:resource android:style/TextAppearance.Material.Large.Inverse not found.
Error:resource android:style/TextAppearance.Material.Widget.PopupMenu.Large not found.
Error:resource android:style/TextAppearance.Material.Widget.PopupMenu.Small not found.
Error:resource android:style/TextAppearance.Material.Medium not found.
Error:resource android:style/TextAppearance.Material.Medium.Inverse not found.
Error:resource android:style/TextAppearance.Material.Menu not found.
Error:resource android:style/TextAppearance.Material.SearchResult.Subtitle not found.
Error:resource android:style/TextAppearance.Material.SearchResult.Title not found.
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
Error:Execution failed for task ':app:processDebugResources'.
> Failed to execute aapt

Gradle 控制台显示这些错误的文本:

* `What went wrong:`

    Execution failed for task ':app:processDebugResources'.
    > Failed to execute aapt

到目前为止我已经尝试过: 将android.enableAapt2=false 添加到 gradle.properties 并从构建菜单中清理项目

【问题讨论】:

    标签: android-studio resources aapt aero-glass


    【解决方案1】:

    看起来那个库需要 compileSdkVersion 至少 23。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-10-18
      • 2013-08-05
      • 2011-10-09
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多