Using resources in Android freezes the main thread
<p>I'm doing the Google Android App Course, and I encountered a weird error. If I call <code>initVariables()</code>, the layout is not appearing, if I comment it out, it appears. If I return after calling <code>getResources()</code>, I see the layout, if I return after calling <code>getString()</code>, no layout.</p>

<p>in the logcat i only see is some idle timeout reached.
i currently having some problems with my environment (eclipse crash and such), so i can't post a full logcat.
This is the code and the xml:</p>

<pre><code>@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.advanced);
    initLayout();
    initVariables();
}

protected void initLayout() {
    m_vwJokeButton = (Button) findViewById(R.id.addJokeButton);
    m_vwJokeEditText = (EditText) findViewById(R.id.newJokeEditText);
    m_vwJokeLayout = (LinearLayout) findViewById(R.id.jokeListLayout);
}

protected void initVariables() {
    Resources resources = getResources();
    author = resources.getString(R.string.author_name);
    m_nDarkColor = resources.getColor(R.color.dark);
    m_nLightColor = resources.getColor(R.color.light);
    m_arrJokeList = new ArrayList&lt;Joke&gt;();
}
</code></pre>

<p>layout</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" &gt;

    &lt;LinearLayout
        android:id="@+id/InputLayoutViewGroup"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" &gt;

        &lt;Button
            android:id="@+id/addJokeButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Add Joke" /&gt;

        &lt;EditText
            android:id="@+id/newJokeEditText"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" &gt;
        &lt;/EditText&gt;
    &lt;/LinearLayout&gt;

    &lt;ScrollView
        android:id="@+id/jokeListViewGroup"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" &gt;

        &lt;LinearLayout
            android:id="@+id/jokeListLayout"
            android:orientation="vertical"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent" &gt;
        &lt;/LinearLayout&gt;
    &lt;/ScrollView&gt;

&lt;/LinearLayout&gt;
</code></pre>
