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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:34:46+00:00 2026-06-14T00:34:46+00:00

after renaming my main class to Main and my main xml to main i

  • 0

after renaming my main class to “Main” and my main xml to “main” i could start my application.
i keep getting this logcat:

08-28 21:46:27.563: D/AndroidRuntime(264): Shutting down VM
08-28 21:46:27.563: W/dalvikvm(264): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
08-28 21:46:27.563: E/AndroidRuntime(264): Uncaught handler: thread main exiting due to uncaught exception
08-28 21:46:27.623: E/AndroidRuntime(264): java.lang.RuntimeException: Unable to start activity ComponentInfo{noc.support/noc.support.Main}: java.lang.NullPointerException
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.os.Handler.dispatchMessage(Handler.java:99)
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.os.Looper.loop(Looper.java:123)
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.app.ActivityThread.main(ActivityThread.java:4363)
08-28 21:46:27.623: E/AndroidRuntime(264):  at java.lang.reflect.Method.invokeNative(Native Method)
08-28 21:46:27.623: E/AndroidRuntime(264):  at java.lang.reflect.Method.invoke(Method.java:521)
08-28 21:46:27.623: E/AndroidRuntime(264):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
08-28 21:46:27.623: E/AndroidRuntime(264):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
08-28 21:46:27.623: E/AndroidRuntime(264):  at dalvik.system.NativeStart.main(Native Method)
08-28 21:46:27.623: E/AndroidRuntime(264): Caused by: java.lang.NullPointerException
08-28 21:46:27.623: E/AndroidRuntime(264):  at noc.support.Main.onCreate(Main.java:116)
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-28 21:46:27.623: E/AndroidRuntime(264):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
08-28 21:46:27.623: E/AndroidRuntime(264):  ... 11 more
08-28 21:46:27.653: I/dalvikvm(264): threadid=7: reacting to signal 3
08-28 21:46:27.663: I/dalvikvm(264): Wrote stack trace to '/data/anr/traces.txt'
08-28 21:47:07.853: I/Process(264): Sending signal. PID: 264 SIG: 9

manifest:

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

    <uses-sdk android:minSdkVersion="7" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />


    <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" android:debuggable="true">

        <service android:name=".BootListnerService" android:label="Boot Service">
            <intent-filter>
                <action android:name="noc.support.BootListnerService" />
            </intent-filter>
        </service>

        <receiver
            android:name=".BootListnerServiceReceiver"
            android:enabled="true"
            android:exported="true"
            android:label="BootListnerServiceReceiver">
            <intent-filter>
                <action android:name="android.intent.action.BOOT_COMPLETED" />
            </intent-filter>
        </receiver>


        <activity
            android:name=".Main"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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

        <activity android:name=".Register" android:label="Register"></activity>

        <activity android:name=".Settings" android:label="Settings"></activity>

        <activity android:name=".ServersStatus" android:label="Servers Status"></activity>

    </application>

</manifest>

and this is the main.xml:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignParentBottom="true"
    android:orientation="vertical" >

    <TextView
        android:id="@+id/emailLable"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/textView1"
        android:layout_marginTop="40dp"
        android:text="Email:"
        android:textAppearance="?android:attr/textAppearanceMedium" android:layout_marginLeft="5dp"/>

    <EditText
        android:id="@+id/emailField"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:ems="10" android:layout_marginLeft="5dp" android:layout_marginRight="5dp"
        android:inputType="textEmailAddress" />

    <TextView
        android:id="@+id/passwordLable"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentLeft="true"
        android:layout_below="@+id/editText1"
        android:layout_marginTop="36dp"
        android:text="Password:"
        android:textAppearance="?android:attr/textAppearanceMedium" android:layout_marginLeft="5dp"/>


    <EditText
        android:id="@+id/passwordField"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:ems="10" 
        android:inputType="textPassword" 
        android:layout_marginLeft="5dp" android:layout_marginRight="5dp"/>

    <CheckBox
        android:id="@+id/rememberEmailPasswordCheckBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Remember my email &amp; password" />

    <CheckBox
        android:id="@+id/loginAutomaticallyCheckBox"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Login automatically" />

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" android:paddingLeft="5dp" android:paddingRight="5dp" android:layout_marginTop="40dp">


        <Button
            android:id="@+id/addButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="1.05"
            android:text="Add" />




        <Button
            android:id="@+id/refreshButton"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_weight="0.86"
            android:text="Refresh" />

    </LinearLayout>

</LinearLayout>

what am i doing wrong?

does anyone have any ideas.

i googled it but i couldn’t find the fix.

when i change “setContentView(R.layout.main);” to any other layout it works fin, but i need this class to start with main.xml

  • 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-14T00:34:48+00:00Added an answer on June 14, 2026 at 12:34 am

    i fixed it by creating a new project and copied all my files into that project but i didn’t replace the main class or the layout instead i copied and pasted the inner code of the class of those two but kept the class name. this way the class name is correct.

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

Sidebar

Related Questions

Here's a strange one. After renaming a class, one of my forms began giving
This question was marked as duplicate, and after the asker succeeded in renaming the
After file upload, I am renaming with this code (in CI) rename ( ./upload/temp/{$data1['upload_data']['client_name']},
Why is the Tags property of Book empty after this code runs? class Program
After deploying WCF server (svc) on my Server, I have got this message when
After a system upgrade i am no longer able to start my tomcat5 server.
After following the RoR getting started tutorial, I added another model as: $ rails
I had my form processes working perfectly but after renaming the form action to
After reading Skeet's article , I went with the general advice to ..consider renaming
I've got a question about renaming a file after it's been uploaded in Zend.

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.