Error building project with Android Studio 3.1 and gradle 3.1.0

前端 未结 2 1964
小鲜肉
小鲜肉 2021-02-15 04:58

I have an issue with this project, I\'m trying to build it after updating Android Studio to the 3.1 version, also I have updated gradle to the version 3.1.0, just the gradle Syn

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-15 05:33

    I've encountered the same problem and this is the solution that fixed my problem.

    I used findViewById for each view defined in the layout file to get a reference from the XML.

    But in Android Studio 3.1 I no longer have to use this.

    I simply removed all of the findViewById code where I placed to get the reference from the XML layout and now the error is gone!

提交回复
热议问题