Error when adding CardView to layout

前端 未结 7 1296
借酒劲吻你
借酒劲吻你 2020-12-17 15:20

I wanted to try out the new toys that google gave us and I\'ve run into some trouble.

Here is my build.gradle:

apply plugin: \'com.android.applicatio         


        
7条回答
  •  死守一世寂寞
    2020-12-17 15:54

    This is a bug in Android Studio, see https://code.google.com/p/android/issues/detail?id=79071

    One of the comments of the patch reads: "This was causing card view rendering to fail. CardView declared styles of the form CardView.Dark due to which the generated R class failed to load."

    Next version should have this fixed according to the bug report (the patch is on branch studio-1.0-dev). They say to build the project once as a workaround, but this does not fix it for me (even though I have exactly the same error and stack trace).

提交回复
热议问题