Error:Execution failed for task ':react-native-android-tablayout:processReleaseResources'



  • E:\ReactNativeProject\MyProject_0.17.0_winx64_react-native.cn\MyProject\node_mod
    ules\react-native-android-tablayout\android\build\intermediates\exploded-aar\com
    .android.support\appcompat-v7\23.0.1\res\drawable\abc_textfield_search_material.
    xml:21:29-78 : No resource found that matches the given name (at 'drawable' with
    value '@drawable/abc_textfield_search_default_mtrl_alpha').

    :react-native-android-tablayout:processReleaseResources FAILED

    FAILURE: Build failed with an exception.

    • What went wrong:
      Execution failed for task ':react-native-android-tablayout:processReleaseResourc
      es'.

    com.android.ide.common.process.ProcessException: org.gradle.process.internal.E
    xecException: Process 'command 'D:\newSdk\Sdk\build-tools\23.0.1\aapt.exe'' fini
    shed with non-zero exit value 1

    • Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug
      option to get more log output.

    BUILD FAILED



  • 我看到stack overflow上有人说At first you go to "Build"-> "Clean Project"

    and then go to "Build" -> "Rebuild Project",可是rn下如何清理、rebuild项目呢?



  • 在命令行下进入android目录,然后运行gradlew clean(Mac下运行./gradlew clean)可以清除临时文件。

    不过从报错上看是react-native-android-tablayout这个组件有问题,感觉清理后不一定能解决这个问题。



  • 可是我的是windows环境,现在换了个组件实现我想要的效果,谢谢大神!


登录后回复