Reputation: 1189
I created a project with API level 8 (Android 2.2) and downloaded the 2.2 SDK in the SDK manager. When I run my android project this error was shown:
Error:(47, 21) No resource found that matches the given name: attr 'android:borderlessButtonStyle'.
I searched and found out that the borderless
style is available on API level 11 and above so why did the Google Developers Hello World tutorial say to choose Android 2.2 so that all devices can run the app?
I changed the API level to 15 which solved the problem.
My question is why does the Android tutorial say to select 2.2 and then run application?
What should I do to run my first app on Android 2.2?
Upvotes: 0
Views: 130
Reputation: 12605
You misunderstood something. You should differentiate between android minimum SDK and the compile and target SDK you can see this link to know the difference.
You should target the latest version in the compile and target SDKs and set your min SDK as you like.
You are now getting this error because your are compiling with an old SDK and you are referring to some of the new APIs that are introduced after this API, they won't be used if you are using an older version, but they will use it in the later versions of the OS because it makes the process easier or getting the look and feel of the new versions of android.
This is happening in one of your libraries and I think it's the appcompat v7 library.
Upvotes: 0
Reputation: 934
Download sdk for api level 15 on your sdk manager and then run the app in your emulator. Or even you could have set the target sdk version as 8 in your application. So please change it and then try running your app
Happy coding..
Upvotes: 1