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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:07:09+00:00 2026-06-11T04:07:09+00:00

I get a crash in the load phase of my application. here after the

  • 0

I get a crash in the load phase of my application.
here after the source code:

DiscoveryMain.java

package com.heeere.androiddnssd.discovery;


import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class DiscoveryMain extends Activity {



    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button button = (Button)this.findViewById(R.id.button);

        button.setOnClickListener(new OnClickListener() {
                public void onClick(View v) {
                    Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse("http://www.google.com"));
                    startActivity(browserIntent);
                }
            });


    }    /** Called when the activity is first created. */

}

main.xml

<?xml version="1.0" encoding="utf-8"?>

<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scroller"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:fillViewport="true">
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="fill_parent" 
              android:layout_height="fill_parent" 
              android:orientation="vertical"
              android:scrollbars="vertical"
              android:fadeScrollbars="true"
              android:isScrollContainer="true">
    <TextView  
            android:layout_width="fill_parent" 
            android:layout_height="wrap_content" 
            android:text="Hello World, Android Discovery" />
    <TextView 
            android:id="@+id/text"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello, I am a TextView" />
    <Button 
            android:id="@+id/button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="Hello, I am a Button" />
    </LinearLayout>
</ScrollView>

Manifest.xml

<?xml version="1.0" encoding="UTF-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="com.heeere.androiddnssd.discovery">
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>

    <application>
         <activity android:name=".MainTest" android:label="DiscoveryActivity">
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
    </application>
</manifest>

LogCat

09-11 11:21:18.186: W/dalvikvm(3415): threadid=3: thread exiting with uncaught exception (group=0x4001e170)
09-11 11:21:18.196: E/AndroidRuntime(3415): Uncaught handler: thread main exiting due to uncaught exception
09-11 11:21:18.206: E/AndroidRuntime(3415): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.heeere.androiddnssd.discovery/com.heeere.androiddnssd.discovery.MainTest}: java.lang.ClassNotFoundException: com.heeere.androiddnssd.discovery.MainTest in loader dalvik.system.PathClassLoader@44798cd0
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2417)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.os.Handler.dispatchMessage(Handler.java:99)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.os.Looper.loop(Looper.java:123)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.app.ActivityThread.main(ActivityThread.java:4363)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at java.lang.reflect.Method.invokeNative(Native Method)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at java.lang.reflect.Method.invoke(Method.java:521)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at dalvik.system.NativeStart.main(Native Method)
09-11 11:21:18.206: E/AndroidRuntime(3415): Caused by: java.lang.ClassNotFoundException: com.heeere.androiddnssd.discovery.MainTest in loader dalvik.system.PathClassLoader@44798cd0
09-11 11:21:18.206: E/AndroidRuntime(3415):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
09-11 11:21:18.206: E/AndroidRuntime(3415):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2409)
09-11 11:21:18.206: E/AndroidRuntime(3415):     ... 11 more

what is the proble in my code ?

  • 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-11T04:07:10+00:00Added an answer on June 11, 2026 at 4:07 am

    do you have this in your manifest?

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

    update:

    What is your start Activity? DiscoveryMain or MainTest? please add the correct one

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

Sidebar

Related Questions

When I run this code to load a jpeg file I get a crash
So my code works for about 90% of people. The rest get a crash
As per client requirement i want to send crash Report when App get crash.
When my app crashes, I get a crash report that takes 5 minutes to
When I run STLport on Darwin I get a strange crash. (Haven't seen it
I try to do an app but I get a lot of crash an
I'm not entirely sure why this crash is happening and I'd like to get
//get the lat and loni throgh the loaddata function.java.util.ConcurrentModificationException at java.util.AbstractList$SimpleListIterator.next(AbstractList.java:64) How to resolve
I am planning to build an application that will get a large amount of
When my view is trying to load, the applications crashes and i get this

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.