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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:29:15+00:00 2026-06-10T13:29:15+00:00

i am having my manifest file like this <manifest xmlns:android=http://schemas.android.com/apk/res/android package=com.basic.adwhrilsample android:versionCode=1 android:versionName=1.0 >

  • 0

enter image description herei am having my manifest file like this

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.basic.adwhrilsample"
android:versionCode="1"
android:versionName="1.0" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="15" />

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

<application
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
   <activity android:name=".Invoker" android:label="@string/app_name">

  <intent-filter>

    <action android:name="android.intent.action.MAIN" />

    <category android:name="android.intent.category.LAUNCHER" />

  </intent-filter>

  <meta-data android:value="my sdk key"

    android:name="ADWHIRL_KEY"/>

</activity>
</application>

and the below is my main.xml file

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent" 
android:id="@+id/layout_main">

<com.adwhirl.AdWhirlLayout
    android:id="@+id/adwhirl_layout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />

</LinearLayout>

and my Invoker.java activity

package com.basic.adwhrilsample;

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

import com.adwhirl.AdWhirlLayout;
import com.adwhirl.AdWhirlLayout.AdWhirlInterface;
import com.adwhirl.AdWhirlManager;
import com.adwhirl.AdWhirlTargeting;

public class Invoker extends Activity implements AdWhirlInterface {

public void onCreate(Bundle savedInstanceState) {

    super.onCreate(savedInstanceState);

    setContentView(R.layout.main);

    AdWhirlManager.setConfigExpireTimeout(1000 * 60 * 5);

    AdWhirlTargeting.setAge(23);

    AdWhirlTargeting.setGender(AdWhirlTargeting.Gender.MALE);

    AdWhirlTargeting.setKeywords("online games gaming");

    AdWhirlTargeting.setPostalCode("94123");

    AdWhirlTargeting.setTestMode(false);

    AdWhirlLayout adWhirlLayout = (AdWhirlLayout)    
findViewById(R.id.adwhirl_layout);

    TextView textView = new TextView(this);

    RelativeLayout.LayoutParams layoutParams = new

    RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT,

    LayoutParams.WRAP_CONTENT);

    int diWidth = 320;

    int diHeight = 52;

    int density = (int) getResources().getDisplayMetrics().density;

    adWhirlLayout.setAdWhirlInterface(this);

    adWhirlLayout.setMaxWidth((int) (diWidth * density));

    adWhirlLayout.setMaxHeight((int) (diHeight * density));

    layoutParams.addRule(RelativeLayout.CENTER_HORIZONTAL);

    textView.setText("Below AdWhirlLayout");

    LinearLayout layout = (LinearLayout) findViewById(R.id.layout_main);

    layout.setGravity(Gravity.CENTER_HORIZONTAL);

    layout.addView(adWhirlLayout, layoutParams);

    layout.addView(textView, layoutParams);

    layout.invalidate();

}

@Override
public void adWhirlGeneric() {

}

}

but i am getting

08-30 10:17:25.194: E/AndroidRuntime(564): java.lang.RuntimeException: Unable to     
instantiate activity   
ComponentInfo{com.basic.adwhrilsample/com.basic.adwhrilsample.Invoker}:  
java.lang.ClassNotFoundException: com.basic.adwhrilsample.Invoker in loader  
dalvik.system.PathClassLoader[/data/app/com.basic.adwhrilsample-2.apk]

Can anyone help me out in solving my issue.
Or can anyone provide me a sample working example so that i could follow it

Updated logcat :

enter image description here

enter image description here

  • 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-10T13:29:17+00:00Added an answer on June 10, 2026 at 1:29 pm

    i think everything is allright just replace imported package replace this

     import android.widget.RelativeLayout.LayoutParams;
    

    by

     import android.view.ViewGroup.LayoutParams;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I observe unmanaged.dll files having a unmanaged.dll.manifest file tagging along. On opening this files
I like the idea of sqlite's manifest typing / type affinity: http://www.sqlite.org/datatype3.html Essentially, if
I'm having a strange problem with the HTML5 manifest file under Chrome 5.0.375.99 but
I am having a problem producing a working jar file. I would like to
I am trying to write the manifest file but I am having weird problem
I have a project set up like this; Project -src -com -top -classes Class_3.java
Having trouble with an .htaccess file on WAMP. Works on the live server, but
I'm having some problems putting my log4j.properties file on classpath. I can use it
I'm trying to add a publisher policy file to the gac as per this
I'm having an Issue with a WPF file not running correctly. On some machines

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.