Android Question Problem using Leadbolt SDK 5.1a

billmoultrie

Member
Licensed User
Longtime User
I have been trying to implement Leadbolt ads using their new SDK 5.1, but I get an error when trying to run the app in 'test'.
I am using LeadboltB4a(Version 1.01) lib

The error I get is:
main_activity_create (java line: 830)
java.lang.NoClassDefFoundError: com.leadbolt.b4a.LeadBoltB4A$1
at com.leadbolt.b4a.LeadBoltB4A.setAdListener(Unknown Source)
at com.leadbolt.b4a.LeadBoltB4A.Initialize(Unknown Source)

The code is:

'ad.Initialize("YOUR_LB_SECTION_ID")
ad.Initialize("983557682") 'light
'To run LeadBolt Display Ad
ad.loadAd()

The manifest code is:

<receiver android:name="com.fqqlcgsfpwflkmbe.AdNotification" />
<service android:name="com.fqqlcgsfpwflkmbe.AdNotificationService" />
<meta-data android:name="_screenid_std" android:value="983557682" />

I have spent about a week with Leadbolt, who have been very helpful, but cannot get any further.
Has anybody had experience of this and can tell me what I am doing wrong.
 

JOFA666

Member
Licensed User
Longtime User
Just in case, here is my code:

Sub Globals
Dim LeadboltAdBannerSmall As LeadBoltB4A
End Sub

Sub Activity_Create(FirstTime As Boolean)
LeadboltAdBannerSmall.Initialize("MYNUMBER")
LeadboltAdBannerSmall.loadAd()
End Sub


Below is the error I am getting, like above:

LeadboltAdBannerSmall.loadAd()
java.lang.NoClassDefFoundError: com.leadbolt.b4a.LeadBoltB4A$1
at com.leadbolt.b4a.LeadBoltB4A.setAdListener(Unknown Source)
at com.leadbolt.b4a.LeadBoltB4A.loadAd(Unknown Source)


I have copied the LeadboltB4A Library .jar and .xml file to my library folder.

PLEASE HELP!
 
Upvote 0

billmoultrie

Member
Licensed User
Longtime User
It took me days to get this to work but eventually Leadbolt sent me a 'Hello world' example which helped me get going.
You must make sure that the package name is inserted into the manifest file.
Copy the Leadbolt AND package jar and XML files are copied to the library.
In B4A libs tick Leadboltb4a AND the package lib (this is what I did not do).
Everything should then work without error.

FYI I have since downloaded Leadbolts SDK version 6 and I am now getting problems with that, so stick with 5.1.
 
Upvote 0

JOFA666

Member
Licensed User
Longtime User
I did what you said, and .... it works!!! Thanks so much for your help. I don't have 5.1, and had to use 6, but I wasn't getting your problem. See you figured it out too!
 
Upvote 0
Top