Butterknife: Could not get unknown property 'packageForR' for task

Created on 30 Mar 2018  Â·  4Comments  Â·  Source: JakeWharton/butterknife

AS version: 3.1
classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
Butterknife version:8.8.1

I update the androidstudio to 3.1, and found an error.
when you add "apply plugin: 'com.jakewharton.butterknife'" to any module ,you will get an error:
Could not get unknown property 'packageForR' for task ':app:processDebugResources' of type com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask.

Most helpful comment

Can I answer in Chinese

All 4 comments

Can I answer in Chinese

I found a solution to change the version of 'gradle_plugin' to 3.0.0, because it seems that the upgrade of 'gradle_plugin' has caused some of the fields to be lost。

use 9.0.0-SNAPSHOT

@zhupengxiang 是的,这样也能解决,将gradle_plugin改为这个版本

Was this page helpful?
0 / 5 - 0 ratings