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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T22:38:22+00:00 2026-05-19T22:38:22+00:00

This is probably the most annoying error I have ever encountered. When I go

  • 0

This is probably the most annoying error I have ever encountered. When I go to inflate a custom view and pass it to and activity, I get this:

02-02 10:34:08.080: ERROR/AndroidRuntime(839): java.lang.RuntimeException: Unable to start activity 

ComponentInfo{android.appion.ResourceManager.UI/android.appion.ResourceManager.UI.ARMHomescreen}: android.view.InflateException: Binary XML file line #62: Error inflating class android.appion.ResourceManager.NUI.ARMPublicService$WorkBench
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2787)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2803)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.app.ActivityThread.access$2300(ActivityThread.java:135)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2136)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.os.Handler.dispatchMessage(Handler.java:99)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.os.Looper.loop(Looper.java:144)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.app.ActivityThread.main(ActivityThread.java:4937)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at java.lang.reflect.Method.invokeNative(Native Method)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at java.lang.reflect.Method.invoke(Method.java:521)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at dalvik.system.NativeStart.main(Native Method)
02-02 10:34:08.080: ERROR/AndroidRuntime(839): Caused by: android.view.InflateException: Binary XML file line #62: Error inflating class android.appion.ResourceManager.NUI.ARMPublicService$WorkBench
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.createView(LayoutInflater.java:503)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:565)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:618)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:621)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.app.Activity.setContentView(Activity.java:1654)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.appion.ResourceManager.UI.ARMHomescreen.onCreate(ARMHomescreen.java:141)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1069)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2751)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     ... 11 more
02-02 10:34:08.080: ERROR/AndroidRuntime(839): Caused by: java.lang.NoSuchMethodException: WorkBench(Context,AttributeSet)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at java.lang.Class.getMatchingConstructor(Class.java:660)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at java.lang.Class.getConstructor(Class.java:477)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     at android.view.LayoutInflater.createView(LayoutInflater.java:475)
02-02 10:34:08.080: ERROR/AndroidRuntime(839):     ... 23 more

What I took away from this was “Hey, I must have forgotten to add AttributeSet to my View, dummy”, this is not so! My constructor is perfect from what I can tell. Can anyone tell what I’m missing or if eclipse is screwing me rectally?

public class WorkBench extends GridView {
    private final String TAG = "WorkBench";

    // The position in the WorkArea
    public String TITLE;
    private String[] DEVICE = new String[6];

    private int mSelection;
    public WorkBench(Context context) {super(context);}
    public WorkBench(Context context, AttributeSet attrs) {
        super(context, attrs);
        setAdapter(new GridAdapter());
    }
    public WorkBench(Context context, AttributeSet attrs, int defStyle) {
        super(context, attrs, defStyle);
    }

... Rest of class definition

Where I’m calling the WorkBench (WorkBench and this function are in a service, that’s why I cast to Activity)

public WorkBench createBench(Context context) {
    return (WorkBench)((Activity)context).findViewById(R.id.workbench);
}

And the XML

<view               class="android.appion.ResourceManager.NUI.ARMPublicService$WorkBench"
    android:id="@+id/workbench"
    android:background="@+drawable/woodtexture1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:numColumns="2" />

Any tips will be helpful, thanks
~Aedon

  • 1 1 Answer
  • 1 View
  • 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-19T22:38:23+00:00Added an answer on May 19, 2026 at 10:38 pm

    Either your class is wrong, or your class is wrong.

    You have:

    class="android.appion.ResourceManager.NUI.ARMPublicService$WorkBench"
    

    This will work if, and only if, WorkBench is a static inner class. Your class definition for WorkBench, shown above, is for a non-static inner class.

    Since it is impossible to use a non-static inner class in this case, your class is probably fine — just adjust WorkBench to be a static inner class, and you should be in OK shape.

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

Sidebar

Related Questions

This is probably the most strange thing I have ever seen in Java: The
This is probably the most classic database problem. I have an E-commerce software solution
This is probably seriously easy to solve for most of you but I cannot
This is probably a trivial question for most but here goes... I am using
This is probably the most frustrating part for newbies learning about zend. Where do
This is probably the MOST basic question and for some reason but I'm a
I am working with VisualStudio 2010 and this would probably be the most common
HI there: I m a software developer and as (probably) most of you, have
this is probably the most basic question in the world, but I cannot figure
I am new to JavaScript and knockoutjs. This is probably the most basic of

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.