Cannot get ChildBrowser working on Cordova 2.0.0: Cannot read property 'childBrowser' of undefined

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

Question

I'm done extensive search online and followed tutorials but I still got Cannot read property 'childBrowser' of undefined.

Here are my steps:

  1. download childbrowser.js and included after cordova-2.0.0.js in index.html
  2. download ChildBroswer.java and put it in com.phonegap.plugins.childBrowser. I checked the build path and src/ is included.
  3. modify the config.xml file by adding the following line (previous examples said plugins.xml which I assume is the old version of config.xml

    plugin name="ChildBrowser" value="com.phonegap.plugins.childBrowser.ChildBrowser"/>

  4. add the following into androidmanifest.xml:

    activity android:name="com.phonegap.DroidGap" android:label="@string/app_name"> intent-filter> /intent-filter> /activity>

  5. My index.html looks like the example here: http://simonmacdonald.blogspot.com/2011/09/phonegap-android-childbrowser-revamp.html .

I've run out of ideas why this is happening to me...

Was it helpful?

Solution 3

Problem solved. My childbrowser.js was partially downloaded which causes this error

OTHER TIPS

i have tried it aswell and it never seems to work, you can just change super.loadUrl("file:///android_asset/www/index.html"); to a web link

this page shows you how to add zoom in and out zoom in phonegap for android

Had this problem too. Realized that the iOS file is named ChildBrowser.js but the Android file is childbrowser.js. Doh!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top