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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T17:47:16+00:00 2026-06-04T17:47:16+00:00

I am new so forgive my primitive question, I am really not getting this.

  • 0

I am new so forgive my primitive question, I am really not getting this. I am simply creating this array on my main activity while doing a tutorial and I get an error

package com.TaskReminder;

import android.R.string;
import android.app.ListActivity;
import android.os.Bundle;
import android.widget.ArrayAdapter;

public class ReminderListActivity extends ListActivity {

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.reminder_list);
    string[] items = new string[]{"aa","bb"};
    ArrayAdapter<string> adapter = new ArrayAdapter<string>(this,R.layout.reminder_row,R.id.text1,items);
    setListAdapter(adapter);


}

and the error on my string array is :

Multiple markers at this line
– Line breakpoint:ReminderListActivity [line: 14] –
onCreate(Bundle)

– Type mismatch: cannot convert from String to R.string

what’s exactly happening here?

  • 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-04T17:47:18+00:00Added an answer on June 4, 2026 at 5:47 pm

    Easy fix, the String type needs to be capitalized.

    string[] items = new string[]{"aa","bb"};
    ArrayAdapter<string> adapter = new ArrayAdapter<string>(this,R.layout.reminder_row,R.id.text1,items);
    

    Becomes:

    String[] items = new String[]{"aa","bb"};
    ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,R.layout.reminder_row,R.id.text1,items);
    

    @gt_ebuddy is right as well, remove this line:

    import android.R.string;

    Using Ctrl+Shift+O is the simplest way to import classes automatically, but it sometimes leads you astray when it tries to import anything from your package’s R file.

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

Sidebar

Related Questions

I'm new to most of this so forgive me if I'm doing something really
After-edit: Wow, this question go long. Please forgive =\ I am creating a new
Forgive me if this question has been asked before but I am new to
I'm new to flex , so forgive me if this is a dumb question.
I'm new to Flash development so please forgive the simplicity of this question... I'm
I'm still new to the Ada programming world so forgive me if this question
I'm pretty new to databases, so forgive me if this is a silly question.
Fairly new to python, forgive me if this is a basic question about learning
Quite new to xslt so forgive me if this is a basic question -
I am new to PHP so please forgive if this question or problem seem

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.