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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:59:59+00:00 2026-06-17T23:59:59+00:00

When I try to run my app on my Samsung Note II, I get

  • 0

When I try to run my app on my Samsung Note II, I get a ResourceNotFoundException for this line

setContentView(R.layout.activity_main);

However, I don’t get this exception when I run it on the emulator or my Samsung Note 10.1.

Both are running Jellybean and my xml files are in folder called layout-land, and the XML file is in there. I tried cleaning my project and re-building, but it still doesn’t work.

Does anyone have an idea what’s wrong?

Let me know if I can provide any more information. Thanks!

01-27 22:11:32.975: E/AndroidRuntime(28330): FATAL EXCEPTION: main
01-27 22:11:32.975: E/AndroidRuntime(28330): java.lang.RuntimeException: Unable to start activity        ComponentInfo{com.ventusthecorgi.hungrycorgi/com.mypackage.app.MainActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030003
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2100)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2125)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.ActivityThread.access$600(ActivityThread.java:140)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1227)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.os.Handler.dispatchMessage(Handler.java:99)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.os.Looper.loop(Looper.java:137)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.ActivityThread.main(ActivityThread.java:4898)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at java.lang.reflect.Method.invokeNative(Native Method)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at java.lang.reflect.Method.invoke(Method.java:511)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1008)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at dalvik.system.NativeStart.main(Native Method)
01-27 22:11:32.975: E/AndroidRuntime(28330): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030003
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.content.res.Resources.getValue(Resources.java:1026)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.content.res.Resources.loadXmlResourceParser(Resources.java:2131)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.content.res.Resources.getLayout(Resources.java:865)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:307)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.Activity.setContentView(Activity.java:1916)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at com.ventusthecorgi.hungrycorgi.MainActivity.onCreate(MainActivity.java:22)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.Activity.performCreate(Activity.java:5191)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
01-27 22:11:32.975: E/AndroidRuntime(28330):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2064)
  • 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-18T00:00:01+00:00Added an answer on June 18, 2026 at 12:00 am

    I suspect that you have your problematic layout files only in the layout-land directory (based on what you wrote in the question). This means that if the device is launched in portrait mode, Android will search for your layout in layout-port directory, then layout, but not layout-land. I might be wrong but my hunch is that your Samsung Note II starts in portrait mode and thus doesn’t see the layout file.

    You have to provide a fallback layout resource. Either copy the layout from layout-land to layout-port and modify it accordingly for portrait mode or just copy it to layout directory as a fallback layout.

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

Sidebar

Related Questions

I get this error when I try to run my app: 2010-04-29 13:49:01.355 MyApp[56123:207]
When I try to run my android app,on a samsung galaxy tab in debugging
i try to run my app, but i have got an exception thrown, in
Please when I try to run this app it stops. The problem is with
So I've been plagued by this issue, whenever I try to run my app
How can i do this? I try to run: app/console doctrine:generate:entities BlogWebBundle But i
I try to build a metro-style-app with Javascript and when I run the Windows
I'm getting this error when I try run DB:Rake : ** Invoke db:migrate (first_time)
Anyone has experienced this problem? Yesterday I still can run my app in simulator
When I try to run my celery workers for my django application, I get

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.