error: No resource identifier found for attribute 'textAlignment' in package 'android'

前端 未结 2 1723
误落风尘
误落风尘 2021-01-03 22:40

This is my res/layout mobile.xml file. Where is my mistake? When I run textview has this error.

    
    <         


        
2条回答
  •  耶瑟儿~
    2021-01-03 23:25

    textAlignment was added in API level 17 (Android 4.2).

    Your emulator/device will need to be running 4.2+ for this to work.

    Otherwise just use android:gravity="center"

    
    

提交回复
热议问题