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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T09:25:01+00:00 2026-05-24T09:25:01+00:00

My issues is the following I’m trying to add a layout to a viewgroup

  • 0

My issues is the following I’m trying to add a layout to a viewgroup my code goes like this:

View Dyn =  (View) findViewById(R.id.lca1);

ViewGroup Layout1 = (ViewGroup) findViewById(R.id.l1);

View inflatedView = View.inflate(this, R.id.lcar1, null);
Layout1.addView(inflatedView);

My Logcat:

08-05 19:01:02.019: ERROR/AndroidRuntime(26934): FATAL EXCEPTION: main
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test/com.test.ViewFlipperExample}: android.content.res.Resources$NotFoundException: Resource ID #0x7f05002a type #0x12 is not valid
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.app.ActivityThread.access$2300(ActivityThread.java:125)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.os.Handler.dispatchMessage(Handler.java:99)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.os.Looper.loop(Looper.java:123)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.app.ActivityThread.main(ActivityThread.java:4627)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at java.lang.reflect.Method.invokeNative(Native Method)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at java.lang.reflect.Method.invoke(Method.java:521)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:871)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:629)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at dalvik.system.NativeStart.main(Native Method)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f05002a type #0x12 is not valid
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.content.res.Resources.loadXmlResourceParser(Resources.java:1874)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.content.res.Resources.getLayout(Resources.java:731)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.view.View.inflate(View.java:8667)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at com.test.ViewFlipperExample.onCreate(ViewFlipperExample.java:66)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
08-05 19:01:02.019: ERROR/AndroidRuntime(26934): … 11 more

Any Help with this would help.
Thank you!!!!!!!

  • 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-24T09:25:02+00:00Added an answer on May 24, 2026 at 9:25 am

    View inflatedView = View.inflate(this, R.id.lcar1, null); is wrong
    you should inflate layout from res/layout folder (R.layout.lcar1 for example or any other)

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

Sidebar

Related Questions

I am having issues with the following code which loads an SQLite database. -
I'm running into issues with the following code: var setupSearch = { searchSuggest: function(field)
The following code has concurrency issues. Here inDegVec is a global int * ,
I'm having some issues getting file uploads to work correctly and the following code
I'm getting the following issues when trying to compile my .java file. Here is
I am having issues with the following part of my code. when nn is
I am having issues with the following code in Scala import org.junit.Test import org.junit.Assert._
I am trying to dynamically load DLLs and I am facing the following issues:
I have the following issues when trying to compile the libtheoraplayer demo (av_player demo).
I am working on a university project. I have the following issues. this is

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.