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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:45:46+00:00 2026-05-26T20:45:46+00:00

So I’m writing an app, and for some reason I get a Runtime exception

  • 0

So I’m writing an app, and for some reason I get a Runtime exception when I try to get the height of a FrameLayout. I use weight quite a bit throughout the design, so I wanted to double check they were the height I needed them to be.

Here is my main Activity:

package com.app.conekta;

import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.Toast;

public class Conekta extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

    }

    @Override
    public void onStart() {

        super.onStart();

        FrameLayout fl1 = (FrameLayout) findViewById(R.id.headerFrameLayout);
        //Button b=(Button) findViewById(R.id.searchButton);
        Toast.makeText(Conekta.this, fl1.getHeight(), Toast.LENGTH_SHORT).show();

    }
}

And this is my XML:

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


    <FrameLayout
        android:id="@+id/headerFrameLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.05"
        android:background="#597eAA" >

        <ImageView
            android:id="@+id/logoImage"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="#7ba1d1"
            android:src="@drawable/logo_conekta" />
    </FrameLayout>

    <LinearLayout
        android:id="@+id/bodyLinearLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.7"
        android:background="#f3f3f3"
        android:orientation="horizontal" >

        <FrameLayout
            android:id="@+id/leftBlankFrameLayout"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="0.15"
            android:background="#f3f3f3" >
        </FrameLayout>

        <LinearLayout
            android:id="@+id/centerVerticalLayout"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="0.7"
            android:orientation="vertical" >

            <FrameLayout
                android:id="@+id/topCenterFrameLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0.35" >
            </FrameLayout>

            <TextView
                android:id="@+id/venueLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0.025"
                android:text="What are you looking for?"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="#000000" />

            <EditText
                android:id="@+id/venueTextField"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0.025" >

                <requestFocus />
            </EditText>

            <FrameLayout
                android:id="@+id/middleCenterFrameLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0.05" >
            </FrameLayout>

            <TextView
                android:id="@+id/locationLabel"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="0.025"
                android:text="Where?"
                android:textAppearance="?android:attr/textAppearanceMedium"
                android:textColor="#000000" />

            <AutoCompleteTextView
                android:id="@+id/locationTextField"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0.025"
                android:text="" />

            <LinearLayout
                android:id="@+id/buttonLinearLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0.05"
                android:background="#f3f3f3"
                android:orientation="horizontal" >

                <FrameLayout
                    android:id="@+id/leftButtonLinearLayout"
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent"
                    android:layout_weight="0.1" >
                </FrameLayout>

                <Button
                    android:id="@+id/searchButton"
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent"
                    android:layout_weight="0.8"
                    android:background="#6fa8dc"
                    android:text="Search" />

                <FrameLayout
                    android:id="@+id/rightButtonLinearLayout"
                    android:layout_width="wrap_content"
                    android:layout_height="fill_parent"
                    android:layout_weight="0.1" >
                </FrameLayout>
            </LinearLayout>

            <FrameLayout
                android:id="@+id/bottomCenterFrameLayout"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content"
                android:layout_weight="0.35" >
            </FrameLayout>
        </LinearLayout>

        <FrameLayout
            android:id="@+id/rightBlankFrameLayout"
            android:layout_width="wrap_content"
            android:layout_height="fill_parent"
            android:layout_weight="0.15"
            android:background="#f3f3f3" >
        </FrameLayout>
    </LinearLayout>

    <FrameLayout
        android:id="@+id/footerFrameLayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="0.15"
        android:background="#7ba1d1" >
    </FrameLayout>

</LinearLayout>

Any idea why this is happening?

11-16 23:57:41.408: W/ResourceType(409): No package identifier when getting name for resource number 0x00000000
11-16 23:57:41.427: D/AndroidRuntime(409): Shutting down VM
11-16 23:57:41.427: W/dalvikvm(409): threadid=3: thread exiting with uncaught exception (group=0x4001b188)
11-16 23:57:41.427: E/AndroidRuntime(409): Uncaught handler: thread main exiting due to uncaught exception
11-16 23:57:41.447: E/AndroidRuntime(409): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.conekta/com.app.conekta.Conekta}: android.content.res.Resources$NotFoundException: String resource ID #0x0
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.app.ActivityThread.access$2200(ActivityThread.java:119)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.os.Handler.dispatchMessage(Handler.java:99)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.os.Looper.loop(Looper.java:123)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.app.ActivityThread.main(ActivityThread.java:4363)
11-16 23:57:41.447: E/AndroidRuntime(409):  at java.lang.reflect.Method.invokeNative(Native Method)
11-16 23:57:41.447: E/AndroidRuntime(409):  at java.lang.reflect.Method.invoke(Method.java:521)
11-16 23:57:41.447: E/AndroidRuntime(409):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
11-16 23:57:41.447: E/AndroidRuntime(409):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
11-16 23:57:41.447: E/AndroidRuntime(409):  at dalvik.system.NativeStart.main(Native Method)
11-16 23:57:41.447: E/AndroidRuntime(409): Caused by: android.content.res.Resources$NotFoundException: String resource ID #0x0
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.content.res.Resources.getText(Resources.java:200)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.widget.Toast.makeText(Toast.java:258)
11-16 23:57:41.447: E/AndroidRuntime(409):  at com.app.conekta.Conekta.onStart(Conekta.java:27)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1129)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.app.Activity.performStart(Activity.java:3723)
11-16 23:57:41.447: E/AndroidRuntime(409):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2468)
11-16 23:57:41.447: E/AndroidRuntime(409):  ... 11 more
11-16 23:57:41.467: I/dalvikvm(409): threadid=7: reacting to signal 3
11-16 23:57:41.467: E/dalvikvm(409): Unable to open stack trace file '/data/anr/traces.txt': Permission denied
  • 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-26T20:45:46+00:00Added an answer on May 26, 2026 at 8:45 pm

    Try changing

    Toast.makeText(Conekta.this, fl1.getHeight(), Toast.LENGTH_SHORT).show();
    

    to

    Toast.makeText(Conekta.this, String.valueOf(fl1.getHeight()), Toast.LENGTH_SHORT).show();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I am writing an app with both english and french support. The app requests
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am trying to understand how to use SyndicationItem to display feed which is
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I am using Paperclip to handle profile photo uploads in my app. They upload

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.