Skip to content

编译sample时出现下面错误,在添加strictSplitResources = false之后,异常消失。什么原因? #175

@aqiuzzt

Description

@aqiuzzt

1: Task failed with an exception.

  • What went wrong:
    Execution failed for task ':lib.utils:processReleaseResources'.

    In strict mode, we do not allow vendor aars, please declare them in host build.gradle:

    • compile('com.android.support:appcompat-v7:23.2.1')
      or turn off the strict mode in root build.gradle:
      small {
      strictSplitResources = false
      }
  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

Activity

galenlin

galenlin commented on Jun 26, 2016

@galenlin
Member

感觉我这个异常提示白说了呀。。:joy:
翻译下就是:严格模式下,插件不允许使用第三方aar,需要在宿主里同时申明,或者将strictSplitResources设置为false。即“非强制模式”

为什么默认为严格模式是因为 最初的设想是第三方依赖一般变动少,可以直接放宿主定义。这样插件里就可以剥离,达到插件最小化。后为了灵活性,增加了strictSplitResources的关闭选项。

aqiuzzt

aqiuzzt commented on Jun 27, 2016

@aqiuzzt
Author

ok ,非常感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @galenlin@aqiuzzt

        Issue actions

          编译sample时出现下面错误,在添加strictSplitResources = false之后,异常消失。什么原因? · Issue #175 · wequick/Small