Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Android Build a Self-Destructing Message Android App Capturing Photos and Videos Setting Where Photos are Saved

Android Import doesn't work for me

I'm on self-destructing message android series, the one part of capturing photos and video. Where I need to create a file in step 4. The Date cannot resolved the type, I know I need to import something else. So I just use organize import in Eclipse, then it gives me three options and I try both. The new Date() and new SimpleDateFormat still could be resolved. Even I import string simpleDataFormat, the organize imports will remove it.

<pre> import java.io.File; import java.util.Date; import java.util.Locale;

import android.app.ActionBar; import android.app.AlertDialog; import android.app.FragmentTransaction; import android.content.DialogInterface; import android.content.Intent; import android.net.Uri; import android.os.Bundle; import android.os.Environment; import android.provider.ContactsContract.Data; /Data could be resolved/ import android.provider.MediaStore; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentActivity; import android.support.v4.view.ViewPager; import android.util.Log; import android.view.Menu; import android.view.MenuItem; import android.view.Window; import android.widget.Toast;

import com.parse.ParseAnalytics; import com.parse.ParseUser; </pre>