Leadbolt - Uncaught TypeError: Object [object Object] has no method 'processHTML' at null:1

StackOverflow https://stackoverflow.com/questions/15424101

  •  23-03-2022
  •  | 
  •  

I was able to run very simple demo ads way back Sept-Nov 2012 when the SDK was still 3.06b. Since then I have never tried android application with leadbolt up until now. Currently Im using the latest SDK (4.00a) but I can't seem to make it work.

Right now, Im trying to run a demo Capture Form but when I tried to run it in my emulator in debug mode I have this in my LogCat: 03-15 02:48:06.657: E/Web Console(1121): Uncaught TypeError: Object [object Object] has no method 'processHTML' at null:1 and the demo add doesn't show.

These are my codes:

MainActivity.java

package com.example.leadbolt4test1;

import com.pad.android.iappad.AdController;

import android.app.Activity;
import android.os.Bundle;

public class MainActivity extends Activity {
    private AdController myController;

    public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main);
            myController = new AdController(this, "816849151");
            myController.loadAd();
    }

    public void onDestroy() {
            myController.destroyAd();
            super.onDestroy();
    }
}


AndroidManifest.xml

<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />
<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.ACCESS_LOCATION_EXTRA_COMMANDS"/>

<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppTheme" >
    <activity
        android:name="com.example.leadbolt4test1.MainActivity"
        android:label="@string/app_name" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

PS: I also tried interstitial, and alert but nothing seems to work. Im sure that I have the correct section id.

Any help would be highly appreciable.

有帮助吗?

解决方案

plase change

targetsdkversion = "17" to targetsdkversion = "16"

In your manifest file, seemed to work for me.

其他提示

Actually this happens due to the new security requirements in SDK 17, i.e. all javascript methods must be annotated with @JavascriptInterface. Don't go with the old easy stupid approach to quickly fix the obvious error by decreasing the targetSdkVersion: you only seem to fix the symptoms of the issue, while leaving the security breach!

http://android-developers.blogspot.gr/2013/02/security-enhancements-in-jelly-bean.html#javascript-access

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top