我从 Eclipse Helios 更新到 Eclipse Juno,将 Android SDK 工具更新到 v23,以及 Google Play lib 4.4。
由于它们,我无法在 Eclipse 图形布局窗口中查看 XML 布局。我收到以下错误。
Exception raised during rendering: com/google/android/gms/ads/AdView : Unsupported major.minor version 51.0
Exception details are logged in Window > Show View > Error Log
错误日志
Could not create the view: org.eclipse.pde.runtime.LogView
仅当我在布局中添加 Google AdView XML 时才会显示该错误,否则图形布局工作正常。
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
xmlns:ads="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<com.google.android.gms.ads.AdView
android:id="@+id/adView"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
ads:adSize="BANNER"
ads:adUnitId="xxxxxxxxxxxxxxxxxxxxxxxx" />
</RelativeLayout>
任何帮助,将不胜感激。
即使根据 zhangxaochen 的回答将 API 更改为 19,我仍然有问题
我安装 JDK 1.7 后解决了这个问题。
Windows 中的 Java 编译器 -> 首选项 -> Java -> 编译器仍然使用 1.6
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)