CocosSharp
CocosSharp copied to clipboard
Xamarin.Forms project build error with CocosSharp.Forms library
By adding CocosSharp.Forms
nuget package to PCL Project and Droid project I got following error:
'Resource.String' does not contain a definition for `ApplicationName'
'Resource.String' does not contain a definition for `Hello'
I workaround this by deleting the following two lines of codes in Resource.Designer.cs
:
global::CocosSharp.Forms.Android.Resource.String.ApplicationName = global::CocosSharpDemo.Droid.Resource.String.ApplicationName;
global::CocosSharp.Forms.Android.Resource.String.Hello = global::CocosSharpDemo.Droid.Resource.String.Hello;
But why are these codes added automatically, are these codes necessary?
just add to your project file strings.xml contains :
On Tue, Jan 17, 2017 at 10:02 AM, Xuchen.Xia [email protected] wrote:
By adding CocosSharp.Forms nuget package to PCL Project and Droid project I got following error:
'Resource.String' does not contain a definition for
ApplicationName' 'Resource.String' does not contain a definition for
Hello'I workaround this by deleting the following two lines of codes in Resource.Designer.cs:
global::CocosSharp.Forms.Android.Resource.String.ApplicationName = global::CocosSharpDemo.Droid.Resource.String.ApplicationName; global::CocosSharp.Forms.Android.Resource.String.Hello = global::CocosSharpDemo.Droid.Resource.String.Hello;
But why are these codes added automatically, are these codes necessary?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mono/CocosSharp/issues/408, or mute the thread https://github.com/notifications/unsubscribe-auth/AMW4MlqrI_TWfBHk4mR8DXZ23eR9LGriks5rTC82gaJpZM4LlLg- .
I am getting the same issue:
Warning XA0106: Skipping MusicTrainer2.Droid.Resource.String.ApplicationName. Please check that your Nuget Package versions are compatible Warning XA0106: Skipping MusicTrainer2.Droid.Resource.String.Hello. Please check that your Nuget Package versions are compatible.
My Resource.Designer.cs file does not reference either one of these strings. I have cleaned and rebuilt. I have added the XAML text as suggested above (quoted text below only so it shows up in this forum's tool):
<resources>
<string name="ApplicationName">applicationName</string>
<string name="Hello">Hello</string>
</resources>
With no improvement. Any idea what I can try next?
Many thanks
Edward