美文网首页Android开发经验谈Android开发
升级Android Studio 3.6.1后AndroidMa

升级Android Studio 3.6.1后AndroidMa

作者: INode | 来源:发表于2020-03-27 18:23 被阅读0次

    报错

    Activity标签下代码:android:screenOrientation="portrait"
    报错:
    Expecting android:screenOrientation="unspecified" or "fullSensor" for this activity so the user can use the application in any orientation and provide a great experience on Chrome OS devices.

    解决

    解决参考地址:https://developer.android.com/topic/arc/window-management

    <application>
    ···
        <meta-data
          android:name="WindowManagerPreference:FreeformWindowOrientation"
          android:value="portrait" />
          ···
    
        <activity
          ···
          android:screenOrientation="nosensor">
          ···
        </activity>
    ···
    </application>
    

    相关文章

      网友评论

        本文标题:升级Android Studio 3.6.1后AndroidMa

        本文链接:https://www.haomeiwen.com/subject/eyrruhtx.html