Since 4.6.2 update: '[app].Resource.String' does not contain a definition for 'library_name'

LeighBowersLeighBowers GBMember
edited April 2013 in Xamarin.Android

Since updating to today's stable release 4.6.2 of Xaramin.Android, I've been unable to build my app successfully:

'[app].Resource.String' does not contain a definition for 'library_name'

It compiled fine prior to the update. Has anyone else encountered this? How do I resolve is?

I need to have a build ready in the next 30 minutes! It's always the way...

Posts

  • LeighBowersLeighBowers GBMember
    edited April 2013

    [REMOVED]

  • LeighBowersLeighBowers GBMember
    edited April 2013

    The generated Resource.desginer.cs classes are slightly different now. I don't have time to mess around with this though - I just need to get a build out!

    How can I roll back to the previous Xamarin.Android release?

  • AtsushiEnomotoAtsushiEnomoto JPMember, Xamarin Team Xamurai

    You could go to your store page and download the previous version at https://store.xamarin.com/account/my/subscription/downloads

  • LeighBowersLeighBowers GBMember

    Thanks. Downloading 4.6 now...

  • LeighBowersLeighBowers GBMember

    Rolling back to 4.6 has addressed the problem [phew].

    So... It looks like there is an issue with Resource.designer.cs generation in 4.6.2

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    How can I roll back to the previous Xamarin.Android release?

    1. Go to your Subscription Downloads page.

    2. Click the View all versions link:

      View all versions

    3. Under e.g. Xamarin.Android, click the down arrow next to your desired platform, e.g. Windows Installer.

    4. Click the desired version you wish to download.

  • LeighBowersLeighBowers GBMember
    edited April 2013

    Thanks. I managed to roll back to 4.6, and it did enable me to re-build successfully again.

    4.6.2 appears to have an issue with Resource.designer.cs generation.

  • LeighBowersLeighBowers GBMember

    As no one else is coming on here to report the same problem, I guess I should report it as an issue (now that I have a spare few moments)...

  • I submitted a ticket yesterday after upgrading to 4.6.2 my project errors with LegacyBar send them a example this morning with the issue

  • KevinMullinsKevinMullins USMember, Beta ✭✭

    I'm getting the exact same issue now as well...

  • KevinMullinsKevinMullins USMember, Beta ✭✭

    Like MilkyJoe, I was able to downgrade to 4.6.0 and the app recompiles again without the error.

  • Dave Wright posted one work around at Bug 11697 Libraries no longer compile.

  • SafiSafi BDMember

    So does it say 4.6.2 has an issue ?

  • JonathanPryorJonathanPryor USXamarin Team Xamurai

    4.6.2 has the issue. 4.6.4 fixes it.

  • LeighBowersLeighBowers GBMember
    edited June 2013

    Weirdly, I've just started to experience a similar issue to this after updating to 4.7.9, earlier today:

    xxx.Resource.String.ApplicationName = yyy.Resource.String.ApplicationName;

    xxx.Resource.String.Hello = yyy.Resource.String.Hello;

    xxx.Resource.String does not contain a definition for 'ApplicationName'

    And where did the 'Hello' reference come from?!

  • PainiRogerPainiRoger CHMember ✭✭

    This morning I had a working solution with 2 Android projects with linked files to shared sources.
    As I didn't like the situation with linked files I have created 2 C# libary projects. Right after that I got as well that error:

    [app].does not contain a definition for 'Hello'

    I currently have version 4.10.2 installed.
    I could solve the issue by providing the string "Hello" in the resources. Where does that "Hello" come from?

  • WilliamRaifordWilliamRaiford USMember ✭✭

    I'm having this issue now as well. This seems to be a recurring bug?

  • kiumokiumo ESMember ✭✭
    edited December 2015

    I cleaned up the solution, build it again and worked.

  • Darth_AaronDarth_Aaron USMember ✭✭

    If you look in the android documentation for localization it mentions storing application resource string in an xml file. Apparently there are some hard coded values in the android Xamarin.Forms Resource.Designer.cs. To fix it in the resources folder under values add an XML file named String.xml and in it put:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
    <string name="ApplicationName">ApplicationName</string>
    <string name="Hello">Hello</string>
    </resources>
    
Sign In or Register to comment.