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

  • Question

  • User158 posted

    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...

    Wednesday, April 10, 2013 1:37 PM

All replies

  • User158 posted

    [REMOVED]

    Wednesday, April 10, 2013 1:40 PM
  • User158 posted

    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?

    Wednesday, April 10, 2013 1:47 PM
  • User54 posted

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

    Wednesday, April 10, 2013 2:07 PM
  • User158 posted

    Thanks. Downloading 4.6 now...

    Wednesday, April 10, 2013 2:11 PM
  • User158 posted

    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

    Wednesday, April 10, 2013 2:25 PM
  • User48 posted

    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.

    Wednesday, April 10, 2013 2:33 PM
  • User158 posted

    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.

    Wednesday, April 10, 2013 2:37 PM
  • User158 posted

    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)...

    Wednesday, April 10, 2013 9:10 PM
  • User1762 posted

    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

    Thursday, April 11, 2013 2:05 PM
  • User562 posted

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

    Thursday, April 11, 2013 2:40 PM
  • User562 posted

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

    Thursday, April 11, 2013 7:12 PM
  • User92 posted

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

    Friday, April 12, 2013 2:24 AM
  • User8470 posted

    So does it say 4.6.2 has an issue ?

    Monday, April 22, 2013 6:57 AM
  • User48 posted

    4.6.2 has the issue. 4.6.4 fixes it.

    Friday, April 26, 2013 3:51 AM
  • User158 posted

    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?!

    Wednesday, June 19, 2013 2:41 PM
  • User3966 posted

    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?

    Monday, February 24, 2014 4:03 PM
  • User68480 posted

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

    Thursday, April 23, 2015 11:43 AM
  • User180682 posted

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

    Monday, December 28, 2015 4:48 PM
  • User125188 posted

    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>
    
    Wednesday, January 27, 2016 2:54 AM