Q:

ImageView does not work more than once

i have 9 ImageViews in my XML.
declared ImageView in the class:
ImageView image;

a little bit about the code:
it's a tic tac toe game, user vs smartphone, when I the user click on any ImageView the image changes fine to the image i want thru the onClick(View v) function using:
        image = (ImageView) findViewById(R.id.block2);
        image.setImageResource(R.drawable.block_2_x);

after my turn ends, the smartphone is playing , using same two lines but with different  ID and DRAWABLE .
calling another function named computerPlay() { ... }
then nothing happens but errors.
BUT, when i run the app again and the smarthphone starts first, the image changes fine in the computerPlay() { .. }
and then my turn gets the errors...
somehow, i feel it's because i can not use the same ImageView more than once ?

big picture of the code:
(WHEN USER CLICK ON IMAGE)
public void touch(View v) {

    ........
                image = (ImageView) findViewById(R.id.block1);
                image.setImageResource(R.drawable.block_1_x);
.......
}

WHEN COMPUTER TRIES TO PLAY:
public void changeImage() {
...
                    image = (ImageView) findViewById(R.id.block2);
                    image.setImageResource(R.drawable.block_1_o);
...
}

ANY IDEAS?

errors:
java.lang.IllegalArgumentException: Widget has the wrong parent
    at org.eclipse.swt.SWT.error(SWT.java:4342)
    at org.eclipse.swt.SWT.error(SWT.java:4276)
    at org.eclipse.swt.SWT.error(SWT.java:4247)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:468)
    at org.eclipse.swt.widgets.Control.setMenu(Control.java:3462)
    at com.android.ddmuilib.logcat.LogCatPanel$20.handleEvent(LogCatPanel.java:1042)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1077)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1062)
    at org.eclipse.swt.widgets.Widget.showMenu(Widget.java:1472)
    at org.eclipse.swt.widgets.Widget.wmContextMenu(Widget.java:1574)
    at org.eclipse.swt.widgets.Control.WM_CONTEXTMENU(Control.java:4673)
    at org.eclipse.swt.widgets.Table.WM_CONTEXTMENU(Table.java:5972)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4532)
    at org.eclipse.swt.widgets.Table.windowProc(Table.java:5913)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.CallWindowProcW(Native Method)
    at org.eclipse.swt.internal.win32.OS.CallWindowProc(OS.java:2440)
    at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:564)
    at org.eclipse.swt.widgets.Table.callWindowProc(Table.java:430)
    at org.eclipse.swt.widgets.Widget.wmRButtonUp(Widget.java:2395)
    at org.eclipse.swt.widgets.Control.WM_RBUTTONUP(Control.java:5134)
    at org.eclipse.swt.widgets.Control.windowProc(Control.java:4596)
    at org.eclipse.swt.widgets.Table.windowProc(Table.java:5913)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4989)
    at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
    at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:2546)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3756)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)
    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
    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:353)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1438)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1414)

Logcat:
05-18 23:43:25.760: E/AndroidRuntime(1377): FATAL EXCEPTION: Timer-0
05-18 23:43:25.760: E/AndroidRuntime(1377): Process: com.example.tttgame, PID: 1377
05-18 23:43:25.760: E/AndroidRuntime(1377): android.view.ViewRootImpl$CalledFromWrongThreadException: Only the original thread that created a view hierarchy can touch its views.
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.ViewRootImpl.checkThread(ViewRootImpl.java:6006)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.ViewRootImpl.requestLayout(ViewRootImpl.java:822)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.View.requestLayout(View.java:16392)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.View.requestLayout(View.java:16392)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.View.requestLayout(View.java:16392)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.View.requestLayout(View.java:16392)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:352)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.View.requestLayout(View.java:16392)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.View.requestLayout(View.java:16392)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.View.requestLayout(View.java:16392)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.widget.RelativeLayout.requestLayout(RelativeLayout.java:352)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.view.View.requestLayout(View.java:16392)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at android.widget.ImageView.setImageResource(ImageView.java:370)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at com.example.tttgame.BoardActivity.changeImage(BoardActivity.java:755)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at com.example.tttgame.BoardActivity.fillboard(BoardActivity.java:739)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at com.example.tttgame.BoardActivity.randPick(BoardActivity.java:715)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at com.example.tttgame.BoardActivity.computerPlay(BoardActivity.java:525)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at com.example.tttgame.BoardActivity$7.run(BoardActivity.java:387)
05-18 23:43:25.760: E/AndroidRuntime(1377):     at java.util.Timer$TimerImpl.run(Timer.java:284)

A:

It appears that you are running the computer play code inside a TimerTask. It is not run on the UI thread, thus throws the error you saw when you are trying to modify the views.
Inside your TimerTask, use the follow code to wrap your existing codes:
runOnUiThread(new Runnable() {
        @Override
        public void run() {
            // This will run on the UI thread
            changeImage();
        }
    });

