Android Studio 之 no render target selected

     今天第一次使用android studio,

  莫名其妙出现 no render target selected的错误,没有设计界面,

  各种百度之后在 stackoverflow.com/questions/22776653/no-rendering-target-selected-using-android-studio 找到了答案,

  I solved it with        File -> Invalidate Caches/Restart.

  虽然解决了还是莫名其妙,猜测原因可能是,在安装完Android Studio后没有先创建AVD,也没有打开Genymotion而导致的问题,因为都用Genymotion来代替IDE自带的模拟器,所以忽略了这一步,在完成上面两步骤后,就解决了问题。

  所以如果 File -> Invalidate Caches/Restart 不能解决问题的话,可以尝试先创建AVD,再重启试试

  1. You need to run the AVD Manager to add a virtual device that matches the target API version your project is set to.

  2. Click Tools->Android->AVD Manager. Click on 'New', add virtual devices targeting higher API levels, e.g 18, 19, etc.

  3. Then restart Android Studio, and open your project, it should find a target device to allow you access to the Design view.

 

      还有一个问题就是API21,API18也是在 

  File -> Invalidate Caches/Restart. 后才出现的。

转载于:https://www.cnblogs.com/Sir-Lin/p/4936286.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值