Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

BlackBerry Advertising Service

Reply
Developer
abhi007tyagi
Posts: 225
Registered: ‎09-29-2010
My Device: Limited Edition Z10, Playbook
Accepted Solution

Error launching app with Ad Service

Hi,

 

I am integrating ad service to my app.

Right now I following documentation to create demo app for it.

 

I am receiving "java.lang.NoClassDef Found Error" as soon as I launch my app.

 

here is the code I am using :

package mypackage;

import java.util.Hashtable;

import net.rim.device.api.ui.container.MainScreen;
import net.rimlib.blackberry.api.advertising.app.Banner;

/**
 * A class extending the MainScreen class, which provides default standard
 * behavior for BlackBerry GUI applications.
 */
public final class MyScreen extends MainScreen
{
	private static final int ZONE_ID = 16741;
    /**
     * Creates a new MyScreen object
     */
    public MyScreen()
    {        
        // Set the displayed title of the screen       
        setTitle("MyTitle");
        Hashtable metadata = new Hashtable();
        metadata.put("age", "1");
        Banner bannerAd = new Banner(ZONE_ID, metadata);
    	bannerAd.setMMASize(Banner.MMA_SIZE_EXTRA_LARGE);
    	bannerAd.setTestModeFlag(true);
    	add(bannerAd);
    }
}

I am building my app using OS 6.0

I have tried running the app on 9800 simulator and also on OS 7.0 device 9860

For both I am getting same error.

 

How can I test sample app on simulator and device?

 

Thanks

Abhinav Tyagi

Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot
Developer
abhi007tyagi
Posts: 225
Registered: ‎09-29-2010
My Device: Limited Edition Z10, Playbook

Re: Error launching app with Ad Service

Also seeing this warning

C:\Eclipse_BB\ads\For_Post6.0.0\net_rim_bbapi_adv_app.jar(net_rim_bbapi_adv_app-1.cod): Warning!: Import file is marked non-parseable
net.rimlib.blackberry.api.advertising.app.Banner: Warning!: No definition found

What I am missing here ???
Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot
Developer
abhi007tyagi
Posts: 225
Registered: ‎09-29-2010
My Device: Limited Edition Z10, Playbook

Re: Error launching app with Ad Service

Its working now

 

I was missing checking Order and Export the jar file :Tt2:

Blackberry Z10-Limited Edition
Blackberry Playbook (won in free playbook offer)
My Apps : pAinT, HealthMeter, Shoot