Error deploying sample code using android, project: android api demos

I get the following error when deploying one of the example projects provided by androids: android api demos for api level 8:

error: Error retrieving parent for item: No resource found that matches the given name 'android:style/Theme.Wallpaper'. 

in the values ​​/styles.xml line 43

 <style name="Theme.Wallpaper" parent="android:style/Theme.Wallpaper"> <item name="android:colorForeground">#fff</item> </style> 

I have been looking for solutions for more than a month. I tried to restore the project by reloading all the source code and restoring and cleaning. Help

+6
source share
3 answers

How to explain raychenon well.

 <style name="Theme.Wallpaper" parent="android:style/Theme.Wallpaper" > <item name="android:colorForeground">#fff</item> </style> 

What happens is that some styles, such as Theme.Wallpaper, are not publicly available. You should no longer expand them.

Some suggest returning to platform_tools_r05 HERE

If you want to make the right path, read the Xavier July 28 HERE

If you want to reuse a style that is private, you must copy the contents of that style into your own, not an extension.

ANSWER

The default theme for windows that want to select a user is a wallpaper.

 <style name="Theme.Wallpaper"> <item name="android:windowBackground">@android:color/transparent</item> <item name="android:colorBackgroundCacheHint">@null</item> <item name="android:windowShowWallpaper">true</item> </style> 

It looks like you want to use the above code from an Android source and create your own theme based on.

Hope this helps you.

+4
source

You can refer to this question posted here and read Xavier's comments on the Google blog.

style link after updating the SDK and ADT plugin in mid 2011

Hope this helps. Subscribe to me.

+3
source

When you import Android samples through β€œAndroid projects from existing code”, I noticed that the libraries and API number are Android 1.5 and API level 3.

This API level does not support android: style / theme.Wallpaper .

I fixed it by setting up Project Build Target on Android 2.2 (API level 8) in the project properties menu.

0
source

Source: https://habr.com/ru/post/927711/


All Articles