切换到Androidx后,布局xml上出现灰屏

时间:2019-06-28 03:23:42

标签: android android-constraintlayout androidx

切换到Androidx后,当我返回到活动xml时,它只显示灰色屏幕,显示为“ androidx.constraintlayout .... ConstraintLayout”

我尝试弄乱gradle并切换受限的布局版本,但是没有运气。

请有人帮助我,因为我不知道该怎么办。

    DailyFieldRecord:                   AB953:
DailyFieldRecordID ActivityCodeID    DailyFieldRecordID:  ItemID: GroupID:
   657                 387                657               1305    210
   888                 420                657               1333    260
   672                 387                657               1335    260  
                                          888               1302    210
                                          888               1336    260
                                          672               1327    260
                                          672               1334    260 
                                          672               1335    260
Expected Output:
Count1:      Count2:
   3            2
Count1 is supposed to count:                Count2 is supposed to count:
   672    1327    260                  657     1333     260
   672    1334    260                  657     1335     260
   672    1335    260

SELECT COUNT(ActivityCodeID) as Count1, COUNT(ActivityCodeID) As Count2
    FROM AB953 ab
    JOIN DailyFieldRecordID dfr on 
         dfr.DailyFieldRecordID=ab.DailyFieldRecordID

     WHERE dfr.ActivityCodeID=387 and ab.GroupID=260 and NOT exists(
          select b.DailyFieldRecordID
          FROM DailyFieldRecordID b
          WHERE ab.DailyFieldRecordID = b.DailyFeildRecordID AND 
                b.ItemID in (1302,1303,1305,1306))
     OR
          dfr.ActivityCodeID=387 and ab.GroupID=260 and exists(
          select b.DailyFieldRecordID
          FROM DailyFieldRecordID b
          WHERE ab.DailyFieldRecordID = b.DailyFeildRecordID AND 
                b.ItemID in (1302,1303,1305,1306))

3 个答案:

答案 0 :(得分:0)

在Android Studio中,按Build >>重建项目

答案 1 :(得分:0)

尝试降级约束布局版本

implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha4'

使用1.1.21.1.1代替2.0.0-alpha4

答案 2 :(得分:-2)

尝试单击Android Studio中箭头所示的“使用Gradle文件同步项目”按钮: