xml不能正常预览

来源:互联网 发布:淘宝网上买东西退货 编辑:程序博客网 时间:2024/04/24 12:25
今天在调试时eclipse不能预览布局文件,提示如下

This version of the rendering library is more recent than your version of ADT plug-in. Please update ADT plug-in

上网搜索才知道原因,现在分享出来,希望能帮到各位年轻的同学们

原文地址:http://blog.csdn.net/g19920917/article/details/20289247

出现这个提示的原因是本地SDK版本高于ADT版本,所以要下调SDK的版本,具体方法有三种

1、在布局预览页面直接设置,如图所示:


2、
  1. Click Help > Install New Software.
  2. In the Work with field, enter: https://dl-ssl.google.com/android/eclipse/
  3. Select Developer Tools / Android Development Tools.
  4. Click Next and complete the wizard. 

3、

Change the Target version to new updates you have. Otherwise, change what SDK version you have in the Android manifest file.

<code><span class="pln"><span style="background-color: rgb(255, 255, 255);">android</span></span><span class="pun"><span style="background-color: rgb(255, 255, 255);">:</span></span><span class="pln"><span style="background-color: rgb(255, 255, 255);">minSdkVersion</span></span><span class="pun"><span style="background-color: rgb(255, 255, 255);">=</span></span><span class="str"><span style="background-color: rgb(255, 255, 255);">"8"</span></span><span class="pln"><span style="background-color: rgb(255, 255, 255);">android</span></span><span class="pun"><span style="background-color: rgb(255, 255, 255);">:</span></span><span class="pln"><span style="background-color: rgb(255, 255, 255);">targetSdkVersion</span></span><span class="pun"><span style="background-color: rgb(255, 255, 255);">=</span></span><span class="str"><span style="background-color: rgb(255, 255, 255);">"18"</span></span></code>
<code><span class="str"><span style="background-color: rgb(255, 255, 255);"></span></span></code>
<code><span class="str"><span style="background-color: rgb(255, 255, 255);">希望能帮到各位!</span></span></code>
0 0
原创粉丝点击