Android Studio 3.2 alpha 17 Build失败并显示错误:Android资源链接失败

时间:2018-06-09 23:24:28

标签: android android-studio gradle kotlin aapt2

    Android resource linking failed
    Output:  /Users/$USER/$PROJECT_DIR/app/src/main/res/layout/main_fragment.xml:21: 
        error: resource drawable/ic_search_24dp 
        (aka $PACKAGE_NAME:drawable/ic_search_24dp) not found.

        /Users/$USER/$PROJECT_DIR/app/src/main/res/layout/list_item.xml:20:
        error: resource drawable/ic_send 
        (aka $PACKAGE_NAME:drawable/ic_send) not found.


    error: failed linking file resources.

    Command: /Users/$USER/.gradle/caches/transforms-1/files-1.1/aapt2-
    3.2.0-alpha17-4804415-osx.jar/58236ee12e68217ae9214b5ecae3ebc4/aapt2
    3.2.0-alpha17-4804415-osx/aapt2 link -I\

    /Users/$USER/Library/Android/sdk/platforms/android-27/android.jar\
    --manifest\

    /Users/$USER/$PROJECT_DIR/app/build/intermediates
    /merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml\-o\

    /Users/$USER/$PROJECT_DIR/app/build/intermediates
    /processed_res/debug/processDebugResources/out/resources-debug.ap_\-R\

    @/Users/$USER/$PROJECT_DIR/app/build/intermediates

    /incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt\--auto-add-overlay\--java\
/Users/$USER/$PROJECT_DIR/app/build
/generated/not_namespaced_r_class_sources/debug/processDebugResources/r\
                    --custom-package\
                    $PACKAGE_NAME\
                    -0\
                    apk\
                    --output-text-symbols\
                    /Users/$USER/$PROJECT_DIR/app/build/intermediates/symbols/debug/R.txt\
                    --no-version-vectors
     Daemon:  AAPT2 aapt2-3.2.0-alpha17-4804415-osx Daemon #0

Studio Build:

  • Gradle插件版本:4.6
  • Android插件版本:3.2.0-alpha17
  • 编译SDK版本:API 27:Android 8.1(奥利奥)

依赖关系可能相关

  • ext.kotlin_version ='1.2.41'
  • ext.support_library_version = '27 .1.1'
  • ext.glide_version ='4.0.0-RC0'

重现步骤:

1-在可绘制文件夹

下构建一个具有一些矢量绘图的项目

它指出虽然存在ic_send和ic_search_24dp但却找不到它们。

0 个答案:

没有答案