5
    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

工作室构建:

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

依赖关系可能相关

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

重现步骤:

1-在drawable文件夹下构建一个包含一些vector-drawable的项目

它指出尽管存在 ic_send 和 ic_search_24dp 却找不到它们。

4

0 回答 0