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

  • Home
  • SEARCH
  • 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 7613023
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T02:04:01+00:00 2026-05-31T02:04:01+00:00

When I run my app in landscape mode it has no issues nor does

  • 0

When I run my app in landscape mode it has no issues nor does it have any issues in portrait mode until i try to add an item to one of my lists while still in portrait mode, where of which my app crashes.

any ideas on how to fix this??

here is the error I am getting as feedback in logcat….

03-08 13:30:50.201: D/AndroidRuntime(554): Shutting down VM
03-08 13:30:50.201: W/dalvikvm(554): threadid=1: thread exiting with uncaught exception (group=0x40014760)
03-08 13:30:50.229: E/AndroidRuntime(554): FATAL EXCEPTION: main
03-08 13:30:50.229: E/AndroidRuntime(554): java.lang.RuntimeException: Unable to start activity  ComponentInfo{com.ATG.C3FactSystemTabbed/com.ATG.EditActivities.AmenitiesEditActivity}: java.lang.NullPointerException
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1748)
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1764)
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.app.ActivityThread.access$1500(ActivityThread.java:122)
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1002)
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.os.Handler.dispatchMessage(Handler.java:99)
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.os.Looper.loop(Looper.java:132)
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.app.ActivityThread.main(ActivityThread.java:4025)
03-08 13:30:50.229: E/AndroidRuntime(554):  at java.lang.reflect.Method.invokeNative(Native Method)
03-08 13:30:50.229: E/AndroidRuntime(554):  at java.lang.reflect.Method.invoke(Method.java:491)
03-08 13:30:50.229: E/AndroidRuntime(554):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:841)
03-08 13:30:50.229: E/AndroidRuntime(554):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)
03-08 13:30:50.229: E/AndroidRuntime(554):  at dalvik.system.NativeStart.main(Native Method)
03-08 13:30:50.229: E/AndroidRuntime(554): Caused by: java.lang.NullPointerException
03-08 13:30:50.229: E/AndroidRuntime(554):  at com.ATG.EditActivities.AmenitiesEditActivity.registerButtonListenersAndSetDefaultText(AmenitiesEditActivity.java:68)
03-08 13:30:50.229: E/AndroidRuntime(554):  at com.ATG.EditActivities.AmenitiesEditActivity.onCreate(AmenitiesEditActivity.java:61)
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1048)
03-08 13:30:50.229: E/AndroidRuntime(554):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1712)
03-08 13:30:50.229: E/AndroidRuntime(554):  ... 11 more

this is the line that throws the exception

btnSave.setOnClickListener(new View.OnClickListener(){      <-------
        @Override
        public void onClick(View v){
         . . . . . 
        }
  });

this is only thrown when I am in portrait mode, it never gets thrown unless i change the orientation before trying to add something to the list. And if i already have the view open to add something no matter how i change the orientation it won’t force close.

okay so i checked the files again i had different names for the buttons i was referencing in different xml files. In other words in landscape i was calling the button btnSave and in the other i was calling it btnAmenitiesSave. Problem solved thanks everyone!!!!!!

  • 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-31T02:04:02+00:00Added an answer on May 31, 2026 at 2:04 am

    btnSave is set to null in portrait.

    It means :

    • btnSave is not assigned ( no btnSave = findViewById(....) )
    • or the id the_id specified in btnSave = findViewById(R.id.the_id) does not exist in the portait layout
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i want to run app in landscape and portrait mode, How to check landscape
I am developing an app for iOS 5, which have to run in landscape
my app run in landscape mode i want it to be always in one
I have an app that is in portrait mode, but some screens should have
When I run my app in landscape mode, the second time my view controller's
When I run my app with Leaks and view the Extended Details for any
Can a LINQ enabled app run on a machine that only has the .NET
I'd like to run an app in the KIOSK mode, so that it auto-starts
Just wondering if anybody has run Scala app or web-app on Java Real-Time system?
In ipad app I want to set UISplitViewController method set in portrait mode.(i.e Like

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.