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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T10:08:28+00:00 2026-06-15T10:08:28+00:00

I created a class extending FrameLayout: public class EnhancedMapView extends FrameLayout { private CustomMapView

  • 0

I created a class extending FrameLayout:

public class EnhancedMapView extends FrameLayout
{
private CustomMapView mapViewComponent;

public EnhancedMapView(Context context,String apiKey)
{
    super(context);
    /*mapViewComponent=new CustomMapView(context,apiKey);
    catch (Exception exception) 
    { 
        StackTraceElement[] stackTraceElements=exception.getStackTrace();
        for (StackTraceElement stackTraceElement:stackTraceElements)
            Log.i("Blabla",stackTraceElement.toString());
    }
    buildMapViewLayout();*/
}
}

And this is the activity I’m using the class in:

public class TestMapViewActivity extends Activity 
{
private EnhancedMapView enhancedMapView;

@Override protected void onCreate(Bundle savedInstanceState)
{
    super.onCreate(savedInstanceState);
    String apiKey=getResources().getString(R.string.google_maps_api_key);
    enhancedMapView=new EnhancedMapView(this,apiKey);
    setContentView(enhancedMapView);
}
}

And I’m getting:

11-23 11:43:44.425: E/AndroidRuntime(440): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{shira.android.mapview/shira.android.mapview.EnhancedMapView}: java.lang.InstantiationException: shira.android.mapview.EnhancedMapView
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1569)
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.os.Looper.loop(Looper.java:130)
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.app.ActivityThread.main(ActivityThread.java:3683)
11-23 11:43:44.425: E/AndroidRuntime(440):  at java.lang.reflect.Method.invokeNative(Native Method)
11-23 11:43:44.425: E/AndroidRuntime(440):  at java.lang.reflect.Method.invoke(Method.java:507)
11-23 11:43:44.425: E/AndroidRuntime(440):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
11-23 11:43:44.425: E/AndroidRuntime(440):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
11-23 11:43:44.425: E/AndroidRuntime(440):  at dalvik.system.NativeStart.main(Native Method)
11-23 11:43:44.425: E/AndroidRuntime(440): Caused by: java.lang.InstantiationException: shira.android.mapview.EnhancedMapView
11-23 11:43:44.425: E/AndroidRuntime(440):  at java.lang.Class.newInstanceImpl(Native Method)
11-23 11:43:44.425: E/AndroidRuntime(440):  at java.lang.Class.newInstance(Class.java:1409)
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
11-23 11:43:44.425: E/AndroidRuntime(440):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)

Originally, I had some code using Google Maps, but I commented out all of it. It seems the exception comes from the FrameLayout constructor, which I’m calling from my custom view class (using super), and I have no idea what makes it happen…

Can somebody help me with this? Thanks.

  • 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-15T10:08:29+00:00Added an answer on June 15, 2026 at 10:08 am

    I’m sorry, it was a stupid mistake I made. I put in the activity declaration in the manifest the name of the view instead of the activity. My apologizes to anyone who tried to help.

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

Sidebar

Related Questions

I've created class that takes Exception type in constructor private readonly Exception _exception; public
I created a class with properties like this public class Dependencies { public string
I'd created a custom event: class SomeEvent extends Event { public static var SOMETHING_CHANGED
I have the following classes class A{ private String name; private int value; public
Okay, here's the situation: I've created a class extending Android's SQLOpenHelper class. I've also
I have create a Java class extending LinearLayout as shown below public class CustomLinear
I have create a Java class extending LinearLayout as shown below public class News
I created a class that extends DefaultMutableTreeNode. It has a variable, resource of the
I created a class extending Thread to retrieve user location through LocationManager in a
I have created a class extending SimpleXMLElement which loads an XML containing translations for

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.