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

I am unable to run the Fun Facts app

the process builds correctly with no error but gives this message after build.

"Application install failed, installation failed since App's minsdkVersion(API 15) is newer than the device's API level (API 10) .Open the project structure dialog to edit the minsdkversion . I have tried to fix this but the emulator is not showing the app

chris linder
chris linder
5,921 Points

try running the emulator first

2 Answers

Bunyod Kh
Bunyod Kh
10,221 Points

1) When you create an application you should put the API lower than the API used by android which is run in the emulator. In your case, your emulator is running android whose API is 10 but your application is built with the target to API 15. (if you did it go to 2 or 3)

2) Maybe Android Studio is automatically changing your app's API to the best/latest (API 23). Here you can change in the manifest.xml file (Go to android documentation: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html ). I hope you will be able to figure it out how it works. Actually, it very good resource to go through. (! but be careful with manifest file. don't change anything if you are not sure)

3) If you don't want to go far, just try to change the API in the activity_main.xml file: 1. Go to design tab ( there are design and text tabs if you noticed) 2. Open the (Android version to use when rendering layout in the IDE - little android icon), uncheck (Automatically pick the best) and push (Preview Android Version), several screens appear with the android version names above them, find there the one you need, click it and then in the very drop-down menu delete other views. :)

Sorry for long text and my English. I hope this will help you.

Thank you very much, i downloaded a new virtual device with a higher AP

Thank you very much, i downloaded a new virtual device with a higher AP