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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:05:58+00:00 2026-05-27T02:05:58+00:00

I have been working on this Tab View and I finally got it working

  • 0

I have been working on this Tab View and I finally got it working and all my icons in just right. I went to place a Map View in one of the Tabs just like I would with any other class. For some reason it is not work when I launch the app, it force closes right away. This is the error from LogCat:

11-24 02:06:36.345: E/dalvikvm(1978): Could not find class 'com.nyneaxis.api.gascloud.StationsMap', referenced from method com.nyneaxis.api.gascloud.GasCloudMain.onCreate

11-24 02:06:36.493: E/AndroidRuntime(1978): Uncaught handler: thread main exiting due to uncaught exception
11-24 02:06:36.514: E/AndroidRuntime(1978): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nyneaxis.api.gascloud/com.nyneaxis.api.gascloud.GasCloudMain}: android.view.InflateException: Binary XML file line #24: Error inflating class com.google.android.maps.MapView
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.app.ActivityThread.access$2200(ActivityThread.java:119)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.os.Handler.dispatchMessage(Handler.java:99)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.os.Looper.loop(Looper.java:123)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.app.ActivityThread.main(ActivityThread.java:4363)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at java.lang.reflect.Method.invokeNative(Native Method)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at java.lang.reflect.Method.invoke(Method.java:521)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at dalvik.system.NativeStart.main(Native Method)
11-24 02:06:36.514: E/AndroidRuntime(1978): Caused by: android.view.InflateException: Binary XML file line #24: Error inflating class com.google.android.maps.MapView
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:576)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:198)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.app.Activity.setContentView(Activity.java:1622)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at com.nyneaxis.api.gascloud.GasCloudMain.onCreate(GasCloudMain.java:13)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459)
11-24 02:06:36.514: E/AndroidRuntime(1978):     ... 11 more
11-24 02:06:36.514: E/AndroidRuntime(1978): Caused by: java.lang.ClassNotFoundException: com.google.android.maps.MapView in loader dalvik.system.PathClassLoader@44e83990
11-24 02:06:36.514: E/AndroidRuntime(1978):     at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:243)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at java.lang.ClassLoader.loadClass(ClassLoader.java:532)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.view.LayoutInflater.createView(LayoutInflater.java:466)
11-24 02:06:36.514: E/AndroidRuntime(1978):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)

This is my Main class:

    package com.nyneaxis.api.gascloud;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class GasCloudMain extends TabActivity { 
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        Resources res = getResources();
        TabHost tabHost = getTabHost();
        TabHost.TabSpec spec; 
        Intent intent;

        intent = new Intent().setClass(this, Profile.class);

        spec = tabHost
                .newTabSpec("profile")
                .setIndicator("Profile",
                        res.getDrawable(R.drawable.ic_tab_profile))
                .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, StationsList.class);
        spec = tabHost
                .newTabSpec("stations")
                .setIndicator("Stations",
                        res.getDrawable(R.drawable.ic_tab_station))
                .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, SearchStations.class);
        spec = tabHost
                .newTabSpec("search")
                .setIndicator("Search",
                        res.getDrawable(R.drawable.ic_tab_search))
                .setContent(intent);
        tabHost.addTab(spec);

        intent = new Intent().setClass(this, StationsMap.class);
        spec = tabHost
                .newTabSpec("map")
                .setIndicator("Map",
                        res.getDrawable(R.drawable.ic_tab_maps))
                .setContent(new Intent(this, StationsMap.class).addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP));
        tabHost.addTab(spec);

        tabHost.setCurrentTab(0);
    }
}

main.xml

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

    <LinearLayout
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:orientation="vertical"
        android:padding="5dp" >

        <TabWidget
            android:id="@android:id/tabs"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />

        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:padding="1dp" />

    </LinearLayout>

</TabHost>

maps class

package com.nyneaxis.api.gascloud;

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

import android.os.Bundle;
import android.widget.LinearLayout;

public class StationsMap extends MapActivity  {

    LinearLayout linearLayout;
        MapView mapView;

    public void onCreate(Bundle savedInstanceState){

        mapView = (MapView) findViewById(R.id.mapview);
        mapView.setBuiltInZoomControls(true);
    }

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

}

maps.xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mainlayout"
    android:orientation="vertical"
    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:clickable="true"
        android:apiKey="ABQIAAAAYc7mzgA4G-2FaBLUHTM_1xTjBItGPNb7O-Zq4IGUb6RxSdEi4RQ7Y-p4UARzkmuBTxknyrJRWOA31w"
    />

</RelativeLayout>

Please help, I am lost to what I need to do. I can run the maps class withtout the tabs and it works. Thank you in advance. PS I have triends a few things by Googling but nothing close to what I want to accomplish.

  • 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-27T02:05:58+00:00Added an answer on May 27, 2026 at 2:05 am

    Make sure you have the following in your AndroidManifest.xml file.

    In the <application> tag you should have:

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

    Hope this helps!

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

Sidebar

Related Questions

I have been working all day but unable to achieve this : It is
I have been working on this for the greater part of the day and
I have been working on this problem for 2 days now and it's an
I have been working on this for days but I don't get it so
I have been working on this problem for a while now. I am trying
I have been working on this for 24 hours now, trying to optimize it.
So I have been working on this project for a short while now. I
I have been working on Flex for last couple of months and as this
I have this classic ASP site which has been working fine until we updated
I have recently been working with C2DM on a Samsung Galaxy Tab 10.1 running

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.