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 Build an Interactive Story App (Retired) User Input Introducing ImageViews

Elliott Prendergast
Elliott Prendergast
5,121 Points

Cannot launch app in Emulator

Every time I attempt to launch the Interactive Story app I am presented with this error

'Error:(13, 23) No resource found that matches the given name (at 'icon' with value '@mipmap/ic_launcher').Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\ellio\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1' Information:BUILD FAILED'

Any help would be greatly appreciated.

1 Answer

Kourosh Raeen
Kourosh Raeen
23,733 Points

Take a look at the mipmap folder and see if the ic_launcher.png file is there. If you are missing the image file download the project files from the Download section of the video and you can find the image file in drawable folders.

Elliott Prendergast
Elliott Prendergast
5,121 Points

Hi I have ic_launcher.png in the drawable.hdpi, mhdpi etc folders, I have tried changing the android:icon="@mipmap/ic_launcher" to android:icon="@drawable/ic_launcher" but every time I press run it just changes it back to mipmap and presents me with the same error. Any other suggestions?

Kourosh Raeen
Kourosh Raeen
23,733 Points

In the res folder, do you have the following folders?

mipmap-hdpi mipmap-mdpi mipmap-xhdpi mipmap-xxhdpi

If they are not there go ahead and create them. Then copy the ic_launcher.png files from

drawable-hdpi drawable-mdpi drawable-xhdpi drawable-xxhdpi

and paste them into the corresponding mipmap folders. For example, copy the ic_launcher file from drawable-hdpi and paste it into mipmap-hdpi, etc.

Elliott Prendergast
Elliott Prendergast
5,121 Points

Thanks for your help, that has worked however I am getting this error now when I am trying to run it and I cannot figure out where it is occurring.

Error:(34) No resource identifier found for attribute 'layout_' in package 'android' Error:Execution failed for task ':app:processDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Users\ellio\AppData\Local\Android\sdk\build-tools\23.0.2\aapt.exe'' finished with non-zero exit value 1

Any ideas would be greatly appreciated.

Elliott.

Elliott Prendergast
Elliott Prendergast
5,121 Points

I've just realised it was a typo layout_ instead of layout. Thanks.

Kourosh Raeen
Kourosh Raeen
23,733 Points

Great! Glad you got it to work!