butterknife icon indicating copy to clipboard operation
butterknife copied to clipboard

gradle 7.3.3 can not generate R2

Open strongmanb opened this issue 2 years ago • 8 comments

My project library can not found R2 When gradle version upgrade to 7.3.3. I guess that's namespace caused it,how can I fixed it ?

strongmanb avatar May 13 '22 12:05 strongmanb

I have the same problem

lxb-symbol avatar May 15 '22 02:05 lxb-symbol

butterknife and realm all need to fix

zhaosunny1 avatar May 16 '22 01:05 zhaosunny1

is there no one to solve this problem ? or we need delete all butterknife ??

zhaosunny1 avatar May 26 '22 03:05 zhaosunny1

Any solution found yet for this issue?

dodsont avatar Aug 31 '22 17:08 dodsont

这是来自QQ邮箱的自动回复邮件。   您好,现在无法回复您的邮件。我将尽快给您回复。

EesiLife avatar Oct 11 '22 07:10 EesiLife

same ,please help us.

zhangnanvip avatar Nov 08 '22 03:11 zhangnanvip

Delete all butterknife from your project. Butterknife is not maintained anymore. There's no way to add support for new Gradle version.

giaur500 avatar Dec 06 '22 10:12 giaur500

For me the problem is moving the package attribute from the manifest to gradle as namespace. Without it the generated R2 classes to not have package x.y.z at the top. Moving it back to the manifest solves the problem. Just a workaround that works for now.

Keep this in the AndroidManifest.xml.

<manifest 
	xmlns:android="http://schemas.android.com/apk/res/android"
	package="x.y.z">

Instead of this in build.gradle

namespace 'x.y.z'

d2callpod avatar Sep 01 '23 20:09 d2callpod