简体   繁体   中英

Mono for Android : Splash screen tutorial c#

I am brand new to android mono c# and am just following this Mono tutorial for creating a splash screen.

I have started the tutorial several times from scratch but keep getting the same error when I try to run it through the emulator.

C:\Documents and Settings\duncan\My Documents\MONO Android\HelloAndroid\HelloM4A\HelloM4A\HelloM4A\AndroidManifest.xml(0,0): 
Error 1: No resource found that matches the given name (at 'theme' with value '@style/Theme.Splash'). (1)

Can anybody shed any light on a possible cause for this????

The tutorial doesn't mention the Build Action, but the "AboutResources.txt" that I found in a tutorial solution has:

In order to get the build system to recognize Android resources, set the build action to "AndroidResource"

But even after verifying that I was still getting the same error.

The gotcha I found was that the name has to be lowercase, and I suspect this is because the Android build uses resource tokens. So you don't give the actual file name but the name that resolves to the token - which at least in my case was lower case such as "splash" vs "Splash"

Did you add Styles.xml file to the Resources/Values folder? Also, make sure that its Build Action is set to AndroidResource.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM