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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T01:03:01+00:00 2026-06-02T01:03:01+00:00

i checked similar question on the forum, but couldn’t get it to run. Finally

  • 0

i checked similar question on the forum, but couldn’t get it to run.
Finally i removed everything not needed to focused on the error and i left with that chunk of code. But it’s still crashing with a NoClassDefFoundError at the

AdWhirlLayout adWhirlLayout = new AdWhirlLayout(TestActivity.this, key);

line.

I’am using AdWhirlSDK_Android_3.1.1 but tried as well the AdWhirlSDK_Android_3.0.0. I’ve got the same error.

Java Code.

import com.adwhirl.AdWhirlLayout;

import android.app.Activity;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.LinearLayout.LayoutParams;

public class TestActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);

        setupAds();
    }

    private void setupAds() {
        String key = "adwhirl_key";

        int diWidth = 320;
        int diHeight = 52;
        float density = getResources().getDisplayMetrics().density;

        LinearLayout layout = (LinearLayout) findViewById(R.id.adView);
        RelativeLayout.LayoutParams layoutParams = 
                new RelativeLayout.LayoutParams(
                        LayoutParams.FILL_PARENT, 
                        LayoutParams.WRAP_CONTENT);

        AdWhirlLayout adWhirlLayout = new AdWhirlLayout(TestActivity.this, key);
        adWhirlLayout.setMaxWidth((int) (diWidth * density));
        adWhirlLayout.setMaxHeight((int) (diHeight * density));

        layout.addView(adWhirlLayout, layoutParams);
        layout.invalidate();
    }
}

XML

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical" >

    <TextView
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="@string/hello" />

    <LinearLayout
        android:id="@+id/adView"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content" />

</LinearLayout>

LOGCAT:

04-11 17:59:50.451: E/AndroidRuntime(707): FATAL EXCEPTION: main
04-11 17:59:50.451: E/AndroidRuntime(707): java.lang.NoClassDefFoundError: com.adwhirl.AdWhirlLayout
04-11 17:59:50.451: E/AndroidRuntime(707):  at com.testproject.TestActivity.setupAds(TestActivity.java:34)
04-11 17:59:50.451: E/AndroidRuntime(707):  at com.testproject.TestActivity.onCreate(TestActivity.java:18)
04-11 17:59:50.451: E/AndroidRuntime(707):  at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-11 17:59:50.451: E/AndroidRuntime(707):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1611)
04-11 17:59:50.451: E/AndroidRuntime(707):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
04-11 17:59:50.451: E/AndroidRuntime(707):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
04-11 17:59:50.451: E/AndroidRuntime(707):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
04-11 17:59:50.451: E/AndroidRuntime(707):  at android.os.Handler.dispatchMessage(Handler.java:99)
04-11 17:59:50.451: E/AndroidRuntime(707):  at android.os.Looper.loop(Looper.java:123)
04-11 17:59:50.451: E/AndroidRuntime(707):  at android.app.ActivityThread.main(ActivityThread.java:3683)
04-11 17:59:50.451: E/AndroidRuntime(707):  at java.lang.reflect.Method.invokeNative(Native Method)
04-11 17:59:50.451: E/AndroidRuntime(707):  at java.lang.reflect.Method.invoke(Method.java:507)
04-11 17:59:50.451: E/AndroidRuntime(707):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
04-11 17:59:50.451: E/AndroidRuntime(707):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
04-11 17:59:50.451: E/AndroidRuntime(707):  at dalvik.system.NativeStart.main(Native Method)

Has anybody an idea and can tell my what i cant see.Please.

Best Regards

  • 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-02T01:03:03+00:00Added an answer on June 2, 2026 at 1:03 am

    You should definitely check the link in your comments. Basically you need to handle all of your dependencies in android by putting the required libraries in a “libs” folder. Eclipse doesn’t generate this automatically for you, so you have to make it yourself. Put the “libs” folder in the “res” folder (not bin/res, the res folder that shares the same directory as src).

    Also make sure you have all the proper declarations in your manifest if you are launching other activities, need special permissions for those functions (uses-internet), etc.

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

Sidebar

Related Questions

I have checked this similar question, but the suggestions did not solve my problem:
I've already checked this.. similar question but I am not convinced about the answers...
I have already seen answer of similar question but it couldn't help. The grid
This is quite similar question to one older but the solution did not work
Having typed the question and checked the similar title questions im gonna continue as
First of all I know similar questions has been asked here, I've checked but
I've checked some similar threads, but either they were unclear or too advanced for
I know there are a LOT of similar question to this, but I've tried
There is a similar question here but regarding the class path. ClassNotFoundException com.mysql.jdbc.Driver I've
My question is similar to this one but for a Rails app. I have

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.