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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T15:15:41+00:00 2026-06-11T15:15:41+00:00

hello guys i wrote 2 classes one for the mapView and another for the

  • 0

hello guys i wrote 2 classes one for the mapView and another for the location settings and i use alertDialog box to make the user to choise between enable of GPS or going directly to the map using intent but i face an error . any one can help ???

here is the dialog code

public void onClick(View arg0) {

            AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(
                    context);

            // set title
            alertDialogBuilder.setTitle("Your Title");

            // set dialog message
            alertDialogBuilder
                    .setMessage("Click yes TO ENABLE GPS")
                    .setCancelable(false)
                    .setPositiveButton("Yes",
                            new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog,
                                        int id) {
                                    // if this button is clicked, close
                                    // current activity
                                    Intent intent = new Intent(Settings.ACTION_LOCATION_SOURCE_SETTINGS);  
                                      startActivityForResult(intent, 1);  
                                      } 

                            })
                    .setNegativeButton("No",
                            new DialogInterface.OnClickListener() {
                                public void onClick(DialogInterface dialog,
                                        int id) {
                                    // if this button is clicked, just close
                                    // the dialog box and do nothing
                                    //dialog.cancel();

                                    Intent intent = new Intent(MainActivity.this, AndroidGoogleMapsActivity.class);
                                    context.startActivity(intent);
                                }
                            });



            // create alert dialog
            AlertDialog alertDialog = alertDialogBuilder.create();

            // show it
            alertDialog.show();

        }

    });

and here is the error that i got

09-19 08:28:58.996: W/dalvikvm(440): Unable to resolve superclass of Lcom/mkyong/android/AndroidGoogleMapsActivity; (16)
09-19 08:28:58.996: W/dalvikvm(440): Link of class 'Lcom/mkyong/android/AndroidGoogleMapsActivity;' failed
09-19 08:28:59.004: E/dalvikvm(440): Could not find class 'com.mkyong.android.AndroidGoogleMapsActivity', referenced from method com.mkyong.android.MainActivity$1$2.onClick
09-19 08:28:59.004: W/dalvikvm(440): VFY: unable to resolve const-class 19 (Lcom/mkyong/android/AndroidGoogleMapsActivity;) in Lcom/mkyong/android/MainActivity$1$2;
09-19 08:28:59.004: D/dalvikvm(440): VFY: replacing opcode 0x1c at 0x0008
09-19 08:28:59.014: D/dalvikvm(440): VFY: dead code 0x000a-0018 in Lcom/mkyong/android/MainActivity$1$2;.onClick (Landroid/content/DialogInterface;I)V
09-19 08:29:16.164: D/AndroidRuntime(440): Shutting down VM
09-19 08:29:16.174: W/dalvikvm(440): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
09-19 08:29:16.254: E/AndroidRuntime(440): FATAL EXCEPTION: main
09-19 08:29:16.254: E/AndroidRuntime(440): java.lang.NoClassDefFoundError: com.mkyong.android.AndroidGoogleMapsActivity
09-19 08:29:16.254: E/AndroidRuntime(440):  at com.mkyong.android.MainActivity$1$2.onClick(MainActivity.java:61)
09-19 08:29:16.254: E/AndroidRuntime(440):  at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:158)
09-19 08:29:16.254: E/AndroidRuntime(440):  at android.os.Handler.dispatchMessage(Handler.java:99)
09-19 08:29:16.254: E/AndroidRuntime(440):  at android.os.Looper.loop(Looper.java:123)
09-19 08:29:16.254: E/AndroidRuntime(440):  at android.app.ActivityThread.main(ActivityThread.java:4627)
09-19 08:29:16.254: E/AndroidRuntime(440):  at java.lang.reflect.Method.invokeNative(Native Method)
09-19 08:29:16.254: E/AndroidRuntime(440):  at java.lang.reflect.Method.invoke(Method.java:521)
09-19 08:29:16.254: E/AndroidRuntime(440):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
09-19 08:29:16.254: E/AndroidRuntime(440):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
09-19 08:29:16.254: E/AndroidRuntime(440):  at dalvik.system.NativeStart.main(Native Method)
09-19 08:29:18.725: I/Process(440): Sending signal. PID: 440 SIG: 9

I don’t know how to fix it

  • 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-11T15:15:43+00:00Added an answer on June 11, 2026 at 3:15 pm

    Do you define the AndroidGoogleMapsActivity class and the maps library in your manifest file? You must put in within the element.

    <application ...>
    ...
    <uses-library android:required="true" android:name="com.google.android.maps" />
    ...
    </application>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hello guys i'm having one hell of a time trying to parse an xml
Hello guys I have 1675 line Code. Want to when user click button textbox.text
Hello Guys I have msg box when i press on yes its close that
Hello guys im using WCF RIA Services i have domain services where i wrote
Hello guys, I have an error I cannot solve, on a ASP.NET website. One
When I do open('output1.txt', 'w').write(Hello guys) A file called output1.txt is immediatly created and
Hello guys for example when I open with notepad a text file it's shows
Hello guys i have dataform in silverlight 4 project item source is: ItemsSource={Binding Data,
Hello guys i'm facing a isolated exception when trying to edit my UI it
Hello guys I can't provide the code but you can see it on the

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.