I have a parent activity that calls a child Activity and in onActivityResult() I get a ResourceNotFound exception when it tries to setContentView(R.drawable.color\_syncing). I can do
other manipulations of the View but can't use any resource from R. Any idea why?

In main class..

```
Intent wifiHelperIntent = new Intent(context,WifiHandlerActivity.class);
startActivityForResult(wifiHelperIntent, WIFI_HANDLER_SUB_ACTIVITY_ID);

```

In the child class:

```
private void doFinish() {
log("Finishing wifi...");
setResult(RESULT_OK);
finish();
}

```

Then back in the main class: onActivityResult:

```
public void onActivityResult(int requestCode, int resultCode, Intent data) {
    super.onActivityResult(requestCode, resultCode, data);
    switch (requestCode) {
        case WIFI_HANDLER_SUB_ACTIVITY_ID:
            MonollaLog.log("In onActivityResult from WIFI_HANDLER");
            setContentView(R.drawable.color_syncing);
            return;
        default:
            throw new RuntimeException("Unrecognized sub activity request code: "
                    + requestCode);
        }       
}

```

Error stack trace: [I successfully use this file before the sub activity started]

11-28 14:56:26.312: E/AndroidRuntime(27346): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=1, data=null} to activity {com.monolla.mfbcolor/com.monolla.mfbcolor.MainActivity}: android.content.res.Resources$NotFoundException: File res/drawable/color\_syncing.jpg from xml type layout resource ID #0x7f020003