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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T00:17:15+00:00 2026-06-04T00:17:15+00:00

I have my project classes organized in multiple src folders, which have been working

  • 0

I have my project classes organized in multiple src folders, which have been working just fine until I changed the switch between activities, now incorporating passing of strings to the following activity. I think the problem is related to the class path.

                Bundle bundle = new Bundle();
                bundle.putString("email", userEmail);
                Intent intent = new Intent(MainActivity.this,
                        com.fm.mondev.MeanSelection.class);
                intent.putExtras(bundle);
                startActivity(intent);

[EDIT] I realized the problem is not entirely related to the path of the Classes, even though I currently have MeanSelection.class instead of com.fm.mondev.MeanSelection.class. In fact, the problema seems to be related to the bundle. It works when I use it between the Login and Main activities, but not for activities subsequent to the Main one. I have also tried the alternate approach shown below. I have the subsequent activities edited accordingly.

                Intent intent = new Intent(MainActivity.this,
                        MeanSelection.class);
                intent.putExtra("email", userEmail);
                startActivity(intent);

I have looked at my logcat but I can not detect anything useful. I know this works if I comment the putExtra(s) line.

[ANSWER] After seeking through every error line of the logcat and reading your answers, I realized there was a problem with one of the variables written via Log.d. So, the solution was to erase those lines, since they were there just to verify if the variables were rightly picked from the previous activities via the bundle. My conclusion is: from now on, I will not Log the strings passed from one activity to another. I’m not sure if this is really an issue with Android or just one of those things that comes with no feasible explanation, which we all know so well, but as soon as I erased those lines, I had my app up and running.

  • 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-04T00:17:16+00:00Added an answer on June 4, 2026 at 12:17 am

    The app crashes when it should open the second activity. It’s the following error that makes me believe this is related to the path: “E/AndroidRuntime(7115): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.fm/com.fm.mondev.MeanSelection}: java.lang.NullPointerException: println needs a message”

    println needs a message has NOTHING to do with activity anything. Read your logcat!

    I get this error when I try to Log a null value, i.e.

    String foo = emptyBundle.getString("barValue");
    Log.d(TAG, foo) // error, Log output functions cannot output null values.
    Log.d(TAG, "barValue: " + barValue);  // outputs "barValue: null"
    

    Make sure whatever you’re Logging or System.out.printlning has a value.

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

Sidebar

Related Questions

I have a project which it's domain contain following classes: Courier Customer Food Order
i have an android project which has a lot of classes I've built. i
for example I have project with 200 classes (200 headers and 200 compilatioin units),
I have a project with a number of different classes querying and modifying data
In my project I have put all my css classes in the style sheets.
I have rather large project that uses ICU regex classes. Basically it might run
In my project I have a class that is inherited by many other classes.
I have an Xcode project with the following group structure: ProjectName/ Classes/ class1.h class1.m
I have a NetBeans project set up with a bunch of source classes and
I have created a project that uses scala that has some abstract classes definitions

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.