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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T23:23:01+00:00 2026-05-18T23:23:01+00:00

i’m tring to start a new activity from the main one but i’m getting

  • 0

i’m tring to start a new activity from the main one but i’m getting an error when the application is launched the application … has stopped unexpectedly. please try again (no error on eclipse ). that’s my code:

public class clubber extends Activity {
    protected SearchData sData ;
    protected boolean club;
    protected boolean resto;
    protected boolean bar;
    protected String searchTerms;
    protected String city;
    protected String distance;

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

       (...)

        //Search button action 
        final Button button = (Button) findViewById(R.id.search);
        button.setOnClickListener(new OnClickListener() {
            public void onClick(View v) {
                // Perform action on clicks
                Toast.makeText(clubber.this, "Let's find something !", Toast.LENGTH_SHORT).show();  
                Intent intent = new Intent();
                intent.setClass(clubber.this, Map.class);
                startActivity(intent);
            }
        });
    }
    (...)
}

the target class:

package com.clubber;

import android.os.Bundle;

import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;

public class Map extends MapActivity {
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.map);
        MapView mapView = (MapView) findViewById(R.id.mapView);
        mapView.setBuiltInZoomControls(true);
    }

    protected boolean isRouteDisplayed() {
        // TODO Auto-generated method stub
        return false;
    }
}

androidmanifest.xml:

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

    <uses-library android:name="com.google.android.maps" /> 
    <application android:icon="@drawable/icon" android:label="@string/app_name">

    <activity android:name="com.clubber.ClubberActivity" 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=".Map"></activity>

    </application>
    <uses-permission android:name="android.permission.INTERNET" />

</manifest> 

map.xml:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent">

    <com.google.android.maps.MapView 
        android:id="@+id/mapView"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:enabled="true"
        android:clickable="true"
        android:apiKey="*******************************"
        />

    <LinearLayout android:id="@+id/zoom" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_alignParentBottom="true" 
        android:layout_centerHorizontal="true" 
        /> 

</RelativeLayout>

logcat :

 D/AndroidRuntime(  512): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(  512): CheckJNI is ON
D/AndroidRuntime(  512): Calling main entry com.android.commands.am.Am
I/ActivityManager(   60): Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.club/com.clubber.ClubberActivity } from pid 512
I/ActivityManager(   60): Start proc com.club for activity com.club/com.clubber.ClubberActivity: pid=520 uid=10036 gids={3003, 1015}
D/AndroidRuntime(  512): Shutting down VM
I/AndroidRuntime(  512): NOTE: attach of thread 'Binder Thread #3' failed
D/dalvikvm(  512): GC_CONCURRENT freed 102K, 69% free 319K/1024K, external 0K/0K, paused 1ms+3ms
D/dalvikvm(  512): Debugger has detached; object registry had 1 entries
W/dalvikvm(  520): Unable to resolve superclass of Lcom/clubber/Map; (36)
W/dalvikvm(  520): Link of class 'Lcom/clubber/Map;' failed
E/dalvikvm(  520): Could not find class 'com.clubber.Map', referenced from method com.clubber.ClubberActivity$5.onClick
W/dalvikvm(  520): VFY: unable to resolve const-class 35 (Lcom/clubber/Map;) in Lcom/clubber/ClubberActivity$5;
D/dalvikvm(  520): VFY: replacing opcode 0x1c at 0x0013
D/dalvikvm(  520): VFY: dead code 0x0015-0022 in Lcom/clubber/ClubberActivity$5;.onClick (Landroid/view/View;)V
I/ActivityManager(   60): Displayed com.club/com.clubber.ClubberActivity: +2s131ms
D/dalvikvm(  129): GC_EXPLICIT freed 70K, 50% free 2952K/5831K, external 2638K/3237K, paused 103ms
D/AndroidRuntime(  520): Shutting down VM
W/dalvikvm(  520): threadid=1: thread exiting with uncaught exception (group=0x40015560)
E/AndroidRuntime(  520): FATAL EXCEPTION: main
E/AndroidRuntime(  520): java.lang.NoClassDefFoundError: com.clubber.Map
E/AndroidRuntime(  520):    at com.clubber.ClubberActivity$5.onClick(ClubberActivity.java:121)
E/AndroidRuntime(  520):    at android.view.View.performClick(View.java:2485)
E/AndroidRuntime(  520):    at android.view.View$PerformClick.run(View.java:9080)
E/AndroidRuntime(  520):    at android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(  520):    at android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(  520):    at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(  520):    at android.app.ActivityThread.main(ActivityThread.java:3647)
E/AndroidRuntime(  520):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  520):    at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(  520):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime(  520):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime(  520):    at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(   60):   Force finishing activity com.club/com.clubber.ClubberActivity
W/ActivityManager(   60): Activity pause timeout for HistoryRecord{406b0d20 com.club/com.clubber.ClubberActivity}
D/dalvikvm(   60): GC_CONCURRENT freed 1010K, 47% free 4446K/8263K, external 2046K/2554K, paused 11ms+10ms
  • 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-18T23:23:01+00:00Added an answer on May 18, 2026 at 11:23 pm

    There are two things wrong with the manifest:

    <activity android:name=".Map"></activity> 
    

    should be outside the other activity and in application.

    <uses-library android:name="com.google.android.maps" />
    

    should be inside application

    Use this xml:

      <?xml version="1.0" encoding="utf-8"?>
      <manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.clubber"
      android:versionCode="1"
      android:versionName="1.0">
    
    <application android:icon="@drawable/icon" android:label="@string/app_name">
    
        <uses-library android:name="com.google.android.maps" />     
        <activity android:name=".clubbera" 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=".Map"> </activity>
    
    </application>
    <uses-permission android:name="android.permission.INTERNET" />
    

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

Sidebar

Related Questions

I want to count how many characters a certain string has in PHP, but
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
For some reason, after submitting a string like this Jack’s Spindle from a text
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I've got a string that has curly quotes in it. I'd like to replace
Specifically, suppose I start with the string string =hello \'i am \' me And

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.