Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8045001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T05:24:22+00:00 2026-06-05T05:24:22+00:00

I am trying to make a Hello World app. Here is the link to

  • 0

I am trying to make a Hello World app. Here is the link to the tutorial I am using.

I have successfully gotten through the “Creating the User Interface with Code” and seen the app work in the emulator but when I got to “Creating String Resources” I ran into some trouble. I changed my Strings.xml file to:

    <?xml version="1.0" encoding="utf-8"?>
    <resources>
        <string name="helloButtonText">Say Hello</string>
        <string name="helloLabelText">Hello Mono for Android</string>
    </resources> 

as it says to do, then I changed the lines in my Activity1.cs so it is:

    using System;
    using Android.App;
    using Android.Content;
    using Android.Runtime;
    using Android.Views;
    using Android.Widget;
    using Android.OS;

    namespace HelloM4A
{
[Activity (Label = "HelloM4A", MainLauncher = true)]
public class Activity1 : Activity
{
    int count = 1;

protected override void OnCreate (Bundle bundle)
    {
        base.OnCreate (bundle);

        //Create the user interface in code
        var layout = new LinearLayout (this);
        layout.Orientation = Orientation.Vertical;

        var aLabel = new TextView (this);
        //old line aLabel.Text = "Hello, Mono for Android";
        aLabel.SetText (Resource.String.helloLabelText);

        var aButton = new Button (this);     
        //old line aButton.Text = "Say Hello";
        aButton.SetText (Resource.String.helloButtonText);

    aButton.Click += (sender, e) => {
        aLabel.Text = "Hello from the button";
    }; 
    layout.AddView (aLabel);
    layout.AddView (aButton);          
    SetContentView (layout);
    }
        };
    }
}

}

Then when I try and run, I get the error:
no resource found that matches the given name (at ‘text’ with value ‘@string/hello’)
which it says it is at line 2 of Main.axml so here is that code:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<Button
    android:id="@+id/myButton"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:text="@string/hello" />
</LinearLayout>

I have tried other Android tutorials and I seem to always get stuck at the part where I add something to the Strings.xml file. I solution to this problem would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T05:24:23+00:00Added an answer on June 5, 2026 at 5:24 am
    <Button
        android:id="@+id/myButton"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />
    

    The last attribute on your button’s XML (that is, android:text="@string/hello") is attempting to set the text to the value of the string resource hello. You have not defined a string resource named hello in your strings.xml file. You need to either define one, or use a different one, such as helloButtonText:

    <Button
        android:id="@+id/myButton"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/helloButtonText" />
    

    Alternatively, since you appear to be setting your views programmatically rather than via the XML you’ve defined, you could just get rid of the XML layout file entirely for now. You don’t appear to be using it anywhere.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a simple hello-world executable python gui app in windows using
Hello everyone I have a question... I'm trying to make my sms faker app,
I am trying to do make a C++ hello world that supports Unicode, but
I have created a very basic Hello world application where I am trying to
I am trying to make a simple application using Google App Engine. Below is
I am trying to make a sample Spring 3 Web Hello World sample but
I'm trying to make a hello world servlet plugin for Confluence. In the atlassian-plugin.xml,
Hello I am trying to make a terminal type app that is wider than
I'm trying to make a simple app with glade/gtk/vala. So far I have this:
I am trying to make Hello World to World Hello. But the code is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.