最近学习使用Android Studio,但是发现不能像eclipse一样直接新建layout-land,然后把同名xml文件放进去,我已经通过New-Layout resource file 成功创建了名字相同的xml文件,但是upload到手机上模拟的时候,每次手机一横过来,程序就会闪退请问有人可以教教我怎么设置横屏的xml么?

解决方案 »

  1.   

    AS新建一个layout-land Package是亲测可行的
      

  2.   

    闪退是因为出错了吧,截个log分析下吧
      

  3.   

    LOGCAT:10-15 11:15:46.191 27499-27499/hk.hku.dissertation.smarthome D/dalvikvm: GC_FOR_ALLOC freed 249K, 10% free 20319K/22332K, paused 24ms, total 24ms
    10-15 11:15:46.211 27499-27499/hk.hku.dissertation.smarthome I/dalvikvm-heap: Grow heap (frag case) to 27.712MB for 6144016-byte allocation
    10-15 11:15:47.001 27499-27499/hk.hku.dissertation.smarthome W/IInputConnectionWrapper: showStatusIcon on inactive InputConnection