简体   繁体   中英

Android Studio: GridLayout doens´t work in v.3.5

The problem: Hello everybody,

I have the problem that I want to use a GridLayout, but here in Android Studio 3.5 it doesn't work like in 3.0.1. Every time I want to add a GridLayout, I have to add it first. I do, but nothing happens. Error There are no attributes displayed in the design and after clicking it again I should add it again - I really have no idea. With 3.0.1 you could simply drag it in and directly edit the rows and columns.

Here the build.gradle

Add the following dependency in the build.gradle file for your app or module:

dependencies {
implementation 'androidx.gridlayout:gridlayout:1.0.0-rc01'
}

It worked for me.

您的应用支持 Androidx,但您使用的是 v7 的 Gridlayout 库,该库仅支持 api 28。将您的 Gridlayout 库替换为最新的 Androidx Gridlayout 库

androidx.gridlayout:gridlayout

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM