Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot find R2 in AS 3.3.1 #1481

Closed
usherjc opened this issue Mar 1, 2019 · 12 comments
Closed

cannot find R2 in AS 3.3.1 #1481

usherjc opened this issue Mar 1, 2019 · 12 comments

Comments

@usherjc
Copy link

usherjc commented Mar 1, 2019

project build.gradle


 dependencies {
        classpath 'com.android.tools.build:gradle:3.1.4'
        classpath 'com.jakewharton:butterknife-gradle-plugin:8.4.0'
    }

module build.gradle


apply plugin: 'com.jakewharton.butterknife'

dependencies {
    api project(':modules:base')
    api 'com.jakewharton:butterknife:8.4.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
}

which is can display normally in AS 3.2.1.
and I update AS to version 3.3.1, you can see that R2 is red in IDE, but it can be run and build apks and can be debug in AS. anyway I tried all the idea in the net, and I still cannot resolve the problem.

Chinese Translation:
以上是我的项目中引用的信息,升级AS到3.3.1后,显示R2类找不到,报红,但是项目可以正常运行,也可以正常调试生成APK,但是以上R2报红的问题一直存在,无法解决。请问有没有方法可以解决这个问题?

@usherjc
Copy link
Author

usherjc commented Mar 1, 2019

I also tried the butterknife 8.5.1/8.6.0/9.0.0/10.0.0 ... but the project build failed with them
and the butterknife8.4.0 works normally in AS 3.2.1 so I am confused with that, and there is much less info about this on the net.

@usherjc
Copy link
Author

usherjc commented Mar 1, 2019

when I change this

classpath 'com.jakewharton:butterknife-gradle-plugin:10.1.0'

others not changed

everything ok!!!

amazing...

@usherjc usherjc closed this as completed Mar 1, 2019
@alen252
Copy link

alen252 commented Mar 2, 2019

I also got this question.

@CodeSaid
Copy link

CodeSaid commented Mar 5, 2019

Thanks! bro, This question has trouble me for days

@alen252
Copy link

alen252 commented Mar 8, 2019

But my project does not support Android X. I still can not use 10.1.0.
How to solve my problem.

@JakeWharton
Copy link
Owner

JakeWharton commented Mar 8, 2019 via email

@alen252
Copy link

alen252 commented Mar 12, 2019

Use 9.0.0

On Thu, Mar 7, 2019 at 10:43 PM alen252 @.***> wrote: But my project does not support Android X. I still can not use 10.1.0. How to solve my problem. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#1481 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEEESxH4cnYfuLQCitEA2VRuptULY09ks5vUdxPgaJpZM4bYm1f .

After i upgrade to 9.0.0. I got my project compile error: Program type already present: android.support.v4.app.FrameMetricsAggregator$FrameMetricsBaseImpl

@itzuo
Copy link

itzuo commented Mar 14, 2019

我也遇到这个问题了,怎么解决啊

@usherjc
Copy link
Author

usherjc commented Mar 14, 2019

@alen252 项目不支持Android X是啥意思...

@usherjc
Copy link
Author

usherjc commented Mar 14, 2019

@itzuo 我写那么清楚你看不懂吗...

@usherjc
Copy link
Author

usherjc commented Mar 14, 2019

@alen252 尝试一下升级android support库到27.0.3,compileSdkVersion 升级到 27,如果报红看一些报红的文字逐个解决。

@alen252
Copy link

alen252 commented Mar 15, 2019

@usherjc 谢谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants