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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:27:55+00:00 2026-05-17T22:27:55+00:00

I have an app that works as intended when run on API 8, but

  • 0

I have an app that works as intended when run on API 8, but when I run it on any older API version, it crashes with:

10-28 12:10:50.755: ERROR/AndroidRuntime(1864): Uncaught handler: thread main exiting due to uncaught exception
10-28 12:10:50.765: ERROR/AndroidRuntime(1864): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.nw.caremeter/com.nw.caremeter.CareMeter}: android.view.InflateException: Binary XML file line #35: Error inflating class <unknown>
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2596)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2621)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.app.ActivityThread.access$2200(ActivityThread.java:126)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1932)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.os.Looper.loop(Looper.java:123)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.app.ActivityThread.main(ActivityThread.java:4595)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at java.lang.reflect.Method.invokeNative(Native Method)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at java.lang.reflect.Method.invoke(Method.java:521)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at dalvik.system.NativeStart.main(Native Method)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864): Caused by: android.view.InflateException: Binary XML file line #35: Error inflating class <unknown>
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.view.LayoutInflater.createView(LayoutInflater.java:513)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.app.Activity.setContentView(Activity.java:1629)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at com.nw.caremeter.onCreate(CareMeter.java:48)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2544)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     ... 11 more
10-28 12:10:50.765: ERROR/AndroidRuntime(1864): Caused by: java.lang.reflect.InvocationTargetException
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.widget.ImageView.<init>(ImageView.java:105)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at java.lang.reflect.Constructor.constructNative(Native Method)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.view.LayoutInflater.createView(LayoutInflater.java:500)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     ... 22 more
10-28 12:10:50.765: ERROR/AndroidRuntime(1864): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/needle_green.xml from drawable resource ID #0x7f020005
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.content.res.Resources.loadDrawable(Resources.java:1693)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.widget.ImageView.<init>(ImageView.java:115)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     ... 26 more
10-28 12:10:50.765: ERROR/AndroidRuntime(1864): Caused by: java.lang.NullPointerException
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.graphics.drawable.RotateDrawable.inflate(RotateDrawable.java:207)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:788)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.graphics.drawable.Drawable.createFromXml(Drawable.java:729)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     at android.content.res.Resources.loadDrawable(Resources.java:1690)
10-28 12:10:50.765: ERROR/AndroidRuntime(1864):     ... 28 more

What reasons might there be for this failing on API7? My drawable resources are in res/drawable (I’ve tried making copies in /drawable, and the problem persists regardless of drawable-{hdpi,ldpi} folders). For the sake of completeness, needle_green.xml:

<?xml version="1.0" encoding="UTF-8"?>
<rotate         xmlns:android="http://schemas.android.com/apk/res/android"
                android:fromDegrees="90"
                android:toDegrees="90"
                android:pivotY="125"
                android:drawable="@drawable/needle_base_green" />

And needle_base_green:

<?xml version="1.0" encoding="UTF-8"?>
<shape          xmlns:android="http://schemas.android.com/apk/res/android"
                android:shape="line">
    <stroke     android:width="2dp"
                android:color="#00ff00" />
</shape>

This is pretty much a first android app, so it’s likely something shockingly trivial. Thanks for any help.

  • 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-17T22:27:55+00:00Added an answer on May 17, 2026 at 10:27 pm

    Android can’t find res/drawable/needle_green.xml. Do you have it, if no show us the code.

    added:
    Try to use #FFFF0000 (first two is alpha) as color value

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

Sidebar

Related Questions

I have built an app that works only when not run as a Windows
This is probably a setting error somewhere. I have a django app that works
I have an app that works on the emulator but will intermittently crash when
I have an app that works on most devices we've tested, but in the
Story: One of the app that i have works on python 2.4 and other
I have an MVC3/EF4.1 app that I'm building which now works fine on my
i have a very small utilty app written in c# that works fine on
I have downloaded the Websphere 2.1 App Server and verified that it works fine.
have an app that finds your GPS location successfully, but I need to be
So running grails run-app and my app runs as intended, but when I grails

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.