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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T17:10:08+00:00 2026-05-28T17:10:08+00:00

I am attempting to run commonsguy’s MergeAdapterDemo. The code compiles and runs fine when

  • 0

I am attempting to run commonsguy’s MergeAdapterDemo. The code compiles and runs fine when i comment out the calls to addView. For example, this runs fine:

public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.main);

    adapter=new MergeAdapter();
    arrayAdapter=buildFirstList();
    adapter.addAdapter(arrayAdapter);
    //adapter.addView(buildButton(), true);
    adapter.addAdapter(buildSecondList());
    //adapter.addView(buildLabel());
    adapter.addAdapter(buildSecondList());

However, this will crash:

public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
    setContentView(R.layout.main);

    adapter=new MergeAdapter();
    arrayAdapter=buildFirstList();
    adapter.addAdapter(arrayAdapter);
    adapter.addView(buildButton(), true);
    adapter.addAdapter(buildSecondList());
    adapter.addView(buildLabel());
    adapter.addAdapter(buildSecondList());

Here is the callstack when the crash occurs:

Thread [<1> main] (Suspended (exception NoClassDefFoundError))  
    MergeAdapter.addViews(List, boolean) line: 101  
    MergeAdapter.addView(View, boolean) line: 78    
    MergeAdapter.addView(View) line: 64 
    MergeAdapterDemo.onCreate(Bundle) line: 52  
    Instrumentation.callActivityOnCreate(Activity, Bundle) line: 1047   
    ActivityThread.performLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1611    
    ActivityThread.handleLaunchActivity(ActivityThread$ActivityClientRecord, Intent) line: 1663 
    ActivityThread.access$1500(ActivityThread, ActivityThread$ActivityClientRecord, Intent) line: 117   
    ActivityThread$H.handleMessage(Message) line: 931   
    ActivityThread$H(Handler).dispatchMessage(Message) line: 99 
    Looper.loop() line: 123 
    ActivityThread.main(String[]) line: 3683    
    Method.invokeNative(Object, Object[], Class, Class[], Class, int, boolean) line: not available [native method]  
    Method.invoke(Object, Object...) line: 507  
    ZygoteInit$MethodAndArgsCaller.run() line: 839  
    ZygoteInit.main(String[]) line: 597 
    NativeStart.main(String[]) line: not available [native method]

I am using the prebuilt .jar file that was located in the download section of his page.

Any suggestions on how to get this working? Thanks!

  • 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-28T17:10:09+00:00Added an answer on May 28, 2026 at 5:10 pm

    Line 101 is

     addAdapter(new SackOfViewsAdapter(views));
    

    But you don’t have SackOfViewsAdapter class.

    https://github.com/commonsguy/cwac-merge/blob/master/README.markdown says that:

    This project requires the CWAC SackOfViewsAdapter. A copy of a
    compatible JAR can be found in the libs/ directory of the project,
    though you are welcome to try newer ones, or ones that you have
    patched yourself.

    So you need to include that library in your project as well.

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

Sidebar

Related Questions

I run into an InvalidOperationException when attempting to run this code. Example Code using
I've just installed python 2.7.2 on this machine. I'm attempting to run this code:
When attempting to run the first example in the boost::mpi tutorial , I was
When attempting to run R, I get this error: Fatal error: cannot mkdir R_TempDir
I'm attempting to run TextTransform.exe to generate code using a T4 template file. The
I am attempting to run the sample project for N2CMS. This is required in
Attempting to run this SQL: DELIMITER $$ CREATE TRIGGER crypt_f BEFORE INSERT ON c_data_test
I am attempting to run this JS function when a user clicks on a
I am attempting to run: INSERT INTO orders ('id','datetime','server','price','comment','addons','table_number','Omelet','Pancakes','Crepes','Salad','Steak_Sandwich','Chicken_Quesadilla','BLT','Prime_Rib','Pineapple_Upside_Down_Cake') VALUES ('','18/9/11 6:49:03PM','admin','0', 'N/A','None','0','1','2','3','4','5','6','7','8','9') and
I know very little about Java but I'm attempting to run this applet from

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.