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 7671995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T16:11:05+00:00 2026-05-31T16:11:05+00:00

I am basically doing a tutorial but my program seems to have errors that

  • 0

I am basically doing a tutorial but my program seems to have errors that seem to come from the R file. I have got rid of the auto import and my androidManafest.xml is also giving errors that that’s automatically generated. I am just trying to learn to build a decent app. Any helpful advise on fixing the errors will be appreciated. I pointed to the lines i have error with this” i get error -> “.

my convert.java

    package de.vogella.android.tempconvertor;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.RadioButton;
import android.widget.Toast;

public class Convert extends Activity {
 private EditText text;

 @Override
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
 i get error ->   setContentView(R.layout.main);
 i get error ->   text = (EditText) findViewById(R.id.EditText01);

 }

 // This method is called at button click because we assigned the name to the
 // "On Click property" of the button
 public void myClickHandler(View view) {
  switch (view.getId()) {
 i get error ->   case R.id.Button01:
  i get error ->   RadioButton celsiusButton = (RadioButton) findViewById(R.id.RadioButton01);
 i get error ->    RadioButton fahrenheitButton = (RadioButton) findViewById(R.id.RadioButton02);
   if (text.getText().length() == 0) {
    Toast.makeText(
      this,
      "Please enter a valid number", Toast.LENGTH_LONG).show();
    return;
   }

   float inputValue = Float.parseFloat(text.getText().toString());
   if (celsiusButton.isChecked()) {
    text.setText(String
      .valueOf(convertFahrenheitToCelcius(inputValue)));
   } else {
    text.setText(String
      .valueOf(convertCelciusToFahrenheit(inputValue)));
   }
   // Switch to the other button
   if (fahrenheitButton.isChecked()) {
    fahrenheitButton.setChecked(false);
    celsiusButton.setChecked(true);
   } else {
    fahrenheitButton.setChecked(true);
    celsiusButton.setChecked(false);
   }
   break;
  }
 }

 // Converts to celcius
 private float convertFahrenheitToCelcius(float fahrenheit) {
  return ((fahrenheit - 32) * 5 / 9);
 }

 // Converts to fahrenheit
 private float convertCelciusToFahrenheit(float celsius) {
  return ((celsius * 9) / 5) + 32;
 }
}

Here is my manifest xml file as well

   <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="de.vogella.android.tempconvertor"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="8" />
    <uses-permission />

    <application
        android:icon="@drawable/ic_launcher"
     i get error ->     android:label="@string/app_name" >
        <activity
            android:name=".Convert"
       i get error ->       android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>
  • 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-05-31T16:11:06+00:00Added an answer on May 31, 2026 at 4:11 pm

    First of all, make sure you have MyApp string in your res\values\strings.xml

    After that, make sure you have R file available in your source tree:
    [app_root]->gen->de.vogella.android.tempconvertor->R.java

    After that, make sure you have included your R resource file in import list

    import de.vogella.android.tempconvertor.R;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

basically I want to encapsulate a simple component from code that I already have.
Basically you have two ways for doing this: for (int x = 0; x
I basically have a unix process running and it is doing some heavy processing
Can someone suggest what I am doing wrong? Basically I have a List Items,
I can't seem to figure out what I am doing wrong here. I have
I have just started doing TDD (and basically testing in general so bear with
Okay so i have a packed a proprietary binary format. That is basically a
I have an OpenGL program in which I am doing some augmented reality work.
I have a table with records that has delete links. Basically I followed the
I'm setting up a C++ project, on Ubuntu x64, using Eclipse-CDT. I'm basically doing

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.