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 Adding a Camera Button in the Action Bar

Problems in Android Studio...

When doing this lesson in Android Studio 1.1.0, I've come up with this kind of problems: 1) There is no qualified drawable folders. There is only one drawable folder with no qulifier. 2) Drag and drop to that folder doesn't work.

Any ideas, about these? Ben Jakuben

Thanks in advance!

3 Answers

Angel Viera
Angel Viera
3,292 Points

I think I know this one.

As far as I know, any new drawables that you want to add will need to be added from the "Packages" view or going directly to the folder in Finder/Explorer.

I'll explain. Android Studio 1.1.0 behaves like this now (not sure if earlier versions do this):

If you are in the "Android" view of your project tree, it will not show an empty resource sub-folder. Even if you create a new one, it will not appear because it is empty. Not sure if this is intentional, or an Android Studio bug. (It's certainly a UX "bug"). It will still appear if you change to the "Packages" view of your project tree, like this:

Project View

Also in the "Android" view, if you have an image in different sizes, it will show them all grouped together by image. So it will look like this now: Android View

even though my actual folder structure still separates them by density: Folder Structure 1 Folder Structure 2

Hope this helps.

How did you organise this? If I copy the dowloaded folders into my drawable folder, it doesn't group them anyhow( I can't even access the picture from "@drawable" if the picture is in another folder in drawable, like drawable-hdpi. Angel Viera

Andre Colares
Andre Colares
5,437 Points

Here is the main.xml for correct function at Android Studio 1.4

<menu xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:yourapp="http://schemas.android.com/apk/res-auto">

    <item android:id="@+id/action_edit_friends"
          android:title="@string/menu_edit_friends_label"></item>

    <item android:id="@+id/action_logout"
          android:title="@string/menu_logout_label"></item>

    <item android:id="@+id/action_camera"
          android:icon="@drawable/ic_action_camera"
          android:title="@string/menu_camera_label"
          yourapp:showAsAction="ifRoom"
          ></item>

</menu>