Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Android

Trouble with Android Studio 1.2.2

I recently downloaded Android Studio 1.2.2 and noticed numerous errors before I even started doing anything.

  1. Rendering Problems NOTE: This project contains Java compilation errors, which can cause rendering failures for custom views. Fix compilation problems first.

  2. The following classes could not be found: - android.support.v7.internal.widget.ActionBarOverlayLayout

  3. "Cannot Resolve Symbol..." causing all these import statements to be underlined in the dreaded red squiggly line import android.support.v7.app.ActionBarActivity; import android.support.v7.app.ActionBar; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentPagerAdapter; import android.os.Bundle; import android.support.v4.view.ViewPager;

I have searched all over stack overflow and haven't been able to find a solution. I've tried adding dependencies, switching the theme (Theme.AppCompat.Light.DarkActionBar to Base.Theme.AppCompat.Light.DarkActionBar), switch (ActionBarActivity to AppCompatActivity) nothing has worked so far, but I'm opened to trying again with further instruction.

This is what's in my build.gradle file

dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) compile 'com.android.support:appcompat-v7:22.2.1' }

Using the SDK Manager I have made sure I have all the required supporting files (SDK Tools, Platform Tools, Build Tools, Support Repository, etc)

I would really appreciate any help with getting this new version of Android Studio setup properly, I do not have a ton of experience with Android and I'm not sure what else to try.

Thanks for your time,

Imran

2 Answers

Imran,

I would recommend going with the earlier version provided in the Android course for now. The 1.2.2 version has a lot of known issues. Their is a list of bugs and suggested work arounds here:

http://tools.android.com/knownissues

I hope this helps.

Regards,

Chris

Hi Chris,

Thanks for the quick reply! Should I worry about newer phones being able to use my app if I build it with an older version of Android Studio?

Appreciate the help,

Imran

Nope. The version of Android Studio is not your real concern for that. It is the software development kit (SDK) you use for your project. When you create a new project and choose the minimum SDK, you are saying that the app you are creating requires a device with that SDK or better/higher. The higher the SDK you choose, the less devices your app will work on. The lower the api you choose, the more your app will work on. However, the lower you go, the less features you get and vice versa as well. A good rule of thumb is to plan your app well before coding it and knowing the features you want. Then choosing your api based on your design requirements. I would highly recommend going back over the first section of the Android course videos. It provides a walkthrough of installing the version the course uses and goes over in good detail how the SDK works etc.

I hope this helps.

Regards,

Chris

Okay thank you for the detailed explanation, I really appreciate it!