Cannot get ChildBrowser working on Cordova 2.0.0: Cannot read property 'childBrowser' of undefined
-
13-07-2021 - |
Question
I'm done extensive search online and followed tutorials but I still got Cannot read property 'childBrowser' of undefined.
Here are my steps:
- download childbrowser.js and included after cordova-2.0.0.js in index.html
- download ChildBroswer.java and put it in com.phonegap.plugins.childBrowser. I checked the build path and src/ is included.
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"/>
add the following into androidmanifest.xml:
activity android:name="com.phonegap.DroidGap" android:label="@string/app_name"> intent-filter> /intent-filter> /activity>
- 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...
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!