Cannot resolve symbol `FileUtils` in Codepath `Todo App` tutorial (Android)
<p>I'm trying to follow a <code>Todo</code> app tutorial from Codepath (<a href="https://guides.codepath.com" rel="noreferrer">https://guides.codepath.com</a>).</p>

<p>Source: <a href="https://guides.codepath.com/android/Basic-Todo-App-Tutorial" rel="noreferrer">https://guides.codepath.com/android/Basic-Todo-App-Tutorial</a></p>

<p>As far as I can tell I've followed the tutorial, but am getting the below issue.</p>

<pre><code>Cannot resolve symbol `FileUtils`
</code></pre>

<p><strong>MainActivity.Java</strong></p>

<pre><code>package com.codepath.simpletodo;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.EditText;
import android.widget.ListView; 
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;

public class MainActivity extends AppCompatActivity {
    private ArrayList&lt;String&gt; items;
    private ArrayAdapter&lt;String&gt; itemsAdapter;
    private ListView lvItems;

    private void readItems() {
        File filesDir = getFilesDir();
        File todoFile = new File(filesDir, "todo.txt");
        try {
            items = new ArrayList&lt;String&gt;(FileUtils.readLines(todoFile));
        } catch (IOException e) {
            items = new ArrayList&lt;String&gt;();
        }
    }

    private void writeItems() {
        File filesDir = getFilesDir();
        File todoFile = new File(filesDir, "todo.txt");
        try {
            FileUtils.writeLines(todoFile, items);
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        lvItems = (ListView) findViewById(R.id.lvItems);
        items = new ArrayList&lt;String&gt;();
        itemsAdapter = new ArrayAdapter&lt;String&gt;(this,
                android.R.layout.simple_list_item_1, items);
        lvItems.setAdapter(itemsAdapter);
        items.add("Default item");
        items.add("Another default item");
        items.add("The third default item");
        // setup remove listener method call
        setupListViewListener();
    }

    // Attaches a long click listener to the listview
    private void setupListViewListener() {
        lvItems.setOnItemLongClickListener(
                new AdapterView.OnItemLongClickListener() {
                    @Override
                    public boolean onItemLongClick(AdapterView&lt;?&gt; adapter,
                                                   View item, int pos, long id) {
                        // Remove item within array at position
                        items.remove(pos);
                        // Refresh the adapter
                        itemsAdapter.notifyDataSetChanged();
                        // Return true consumes the long click event (marks it handled)
                        return true;
                    }
                });
    }

    public void onAddItem(View v) {
        EditText etNewItem = (EditText) findViewById(R.id.etNewItem);
        String itemText = etNewItem.getText().toString();
        itemsAdapter.add(itemText);
        etNewItem.setText("");
    }
}
</code></pre>

<p><strong>activity_mail.xml</strong></p>

<p></p>

<pre><code>&lt;ListView
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/lvItems"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_above="@+id/btnAddItem" /&gt;

&lt;EditText
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:id="@+id/etNewItem"
    android:layout_alignTop="@+id/btnAddItem"
    android:hint="Enter a new item"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true"
    android:layout_toLeftOf="@+id/btnAddItem"
    android:layout_toStartOf="@+id/btnAddItem"
    android:layout_alignParentBottom="true" /&gt;

&lt;Button
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Add Item"
    android:id="@+id/btnAddItem"
    android:layout_alignParentBottom="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true"
    android:onClick="onAddItem"
    /&gt;
</code></pre>

<p></p>

<p>I'm extremely new to Android and would be so happy just to get things to work, as I don't have enough background yet to have any hope at debugging.</p>

<p>Any guidance would be very appreciated.</p>

<h2>UPDATE 1</h2>

<p><strong>app/build.gradle</strong></p>

<p><em>Original Format</em></p>

<pre><code>android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.codepath.simpletodo"
        minSdkVersion 14
        targetSdkVersion 24
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0'
}
</code></pre>

<p>I've tried various combinations of including <code>'org.apache.commons:commons-io:1.3.2'</code>.</p>

<ol>
<li>Replacing <code>'com.android.support:appcompat-v7:24.0.0'</code> with <code>'org.apache.commons:commons-io:1.3.2'</code></li>
<li>Putting both on same line: <code>compile 'com.android.support:appcompat-v7:24.0.0', 'org.apache.commons:commons-io:1.3.2'</code>.</li>
<li>Putting both on separate lines: <code>compile 'com.android.support:appcompat-v7:24.0.0' compile 'org.apache.commons:commons-io:1.3.2'</code>.</li>
</ol>

<p>But when attempting the <code>Gradle project sync</code>, there is a failure with below message.</p>

<pre><code>Error:(24, 13) Failed to resolve: compile org.apache.commons:commons-io:1.3.2
</code></pre>

<h2>UPDATE 2</h2>

<p>The final working version needed to look like this.</p>

<pre><code>dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile group: 'org.apache.commons', name: 'commons-io', version: '1.3.2'
}
</code></pre>