Android : Exception raised during rendering. Classes not found

on Saturday, January 31, 2015


I have this XML which contains an item list. This xml file shows the following error:



!ENTRY org.eclipse.m2e.logback.configuration 2 0 2015-01-30 00:55:29.947
!MESSAGE Exception while setting up logging:org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
!STACK 0
java.lang.ClassCastException: org.eclipse.osgi.internal.framework.EquinoxConfiguration$1 cannot be cast to java.lang.String
at org.eclipse.m2e.logback.configuration.LogHelper.logJavaProperties(LogHelper.java:26)
at org.eclipse.m2e.logback.configuration.LogPlugin.loadConfiguration(LogPlugin.java:189)
at org.eclipse.m2e.logback.configuration.LogPlugin.configureLogback(LogPlugin.java:144)
at org.eclipse.m2e.logback.configuration.LogPlugin.access$2(LogPlugin.java:107)
at org.eclipse.m2e.logback.configuration.LogPlugin$1.run(LogPlugin.java:62)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)


In the graphic mode of this xml the message is:



Exception raised during rendering: com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup
Exception details are logged in Window > Show View > Error Log
The following classes could not be found:
- item (Fix Build Path, Edit XML)
- menu (Fix Build Path, Edit XML)


My xml file is:



<?xml version="1.0" encoding="utf-8"?>
<menu
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content" >

<item
android:id="@+id/menuSalir"
android:onClick="salirApp"
android:orderInCategory="2"
android:showAsAction="always"
android:title="@string/salir"
android:visibility="visible"/>

<item
android:id="@+id/menuVerSolicitudes"
android:icon="@drawable/ic_tab_otros"
android:onClick="abreActivitySolicitudes"
android:orderInCategory="1"
android:showAsAction="always"
android:title="@string/verSolicitudes"
android:visibility="visible"/>
</menu>


And I have tried another this without results (I've seen this solution in other questions in this forum): introduce menu in a layout.


What can be the problem? Thanks a lot.


0 comments:

Post a Comment