GridLayout giving errors, crashing app-Collection of common programming errors

I’m pretty new to layouts, but I was able to successfully make a pretty nice looking layout (for a tablet). In Eclipse, it works great. I made it all with the ‘target’ on Android 4.0 (ICS), but obviously my tablet only runs 3.0 (Honeycomb). When I realised the error, I changed the viewer/editing config to 3.2, but Eclipse won’t even display the graphic of the layout anymore, it simply spits out:

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:
    - GridLayout (Change to android.widget.GridLayout, Fix Build Path, Edit XML)

The error log pops out:

java.lang.ClassCastException: com.android.layoutlib.bridge.MockView cannot be cast to android.view.ViewGroup
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:84)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:702)
at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:86)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:702)
at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
at android.view.LayoutInflater.inflate(LayoutInflater.java:367)
at com.android.layoutlib.bridge.impl.RenderSessionImpl.inflate(RenderSessionImpl.java:324)
at com.android.layoutlib.bridge.Bridge.createSession(Bridge.java:321)
at com.android.ide.common.rendering.LayoutLibrary.createSession(LayoutLibrary.java:325)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.RenderService.createRenderSession(RenderService.java:372)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.renderWithBridge(GraphicalEditorPart.java:1317)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart.recomputeLayout(GraphicalEditorPart.java:1071)
at com.android.ide.eclipse.adt.internal.editors.layout.gle2.GraphicalEditorPart$ConfigListener.onConfigurationChange(GraphicalEditorPart.java:493)
at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.onRenderingTargetChange(ConfigurationComposite.java:2192)
at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite.access$4(ConfigurationComposite.java:2157)
at com.android.ide.eclipse.adt.internal.editors.layout.configuration.ConfigurationComposite$2.widgetSelected(ConfigurationComposite.java:441)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:234)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:3783)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1375)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1398)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1383)
at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1195)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3629)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3284)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2640)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2604)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2438)
at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:671)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:664)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:620)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:575)
at org.eclipse.equinox.launcher.Main.run(Main.java:1408)

And here is my layout:






    

    

        

            

            

            

            

            

            

            

            

            

            

            
        

        

            

            

            

            

            

        

        

            

                

                
            
        
    




Ultimately, I’m able to install the app on my tablet, but it just crashes right away with this from LogCat:

    10-29 23:44:05.180: E/AndroidRuntime(14135): FATAL EXCEPTION: main
    10-29 23:44:05.180: E/AndroidRuntime(14135): java.lang.RuntimeException: Unable to start activity ComponentInfo{ca.ajwest.irishpoker/ca.ajwest.irishpoker.IrishPokerActivity}: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at      android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1741)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1757)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.app.ActivityThread.access$1500(ActivityThread.java:123)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:998)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.os.Handler.dispatchMessage(Handler.java:99)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.os.Looper.loop(Looper.java:126)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.app.ActivityThread.main(ActivityThread.java:4002)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at java.lang.reflect.Method.invokeNative(Native Method)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at java.lang.reflect.Method.invoke(Method.java:491)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:844)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:602)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at dalvik.system.NativeStart.main(Native Method)
    10-29 23:44:05.180: E/AndroidRuntime(14135): Caused by: java.lang.UnsupportedOperationException: addView(View, LayoutParams) is not supported in AdapterView
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.widget.AdapterView.addView(AdapterView.java:459)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:728)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.view.LayoutInflater.rInflate(LayoutInflater.java:727)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.view.LayoutInflater.inflate(LayoutInflater.java:479)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.view.LayoutInflater.inflate(LayoutInflater.java:391)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.view.LayoutInflater.inflate(LayoutInflater.java:347)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:247)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.app.Activity.setContentView(Activity.java:1771)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at ca.ajwest.irishpoker.IrishPokerActivity.onCreate(IrishPokerActivity.java:30)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1705)
    10-29 23:44:05.180: E/AndroidRuntime(14135):    ... 11 more

Will re-making the whole layout with 2.3 selected fix this problem? That’s sooo sucky…