qpython-android / qpython

QPython is an Android Python engine primarily designed for Python and AI learners. It offers a range of impressive features to enhance Python programming experience.
https://www.qpython.org
1.03k stars 191 forks source link

webview simple question #172

Open cjaramilu opened 5 years ago

cjaramilu commented 5 years ago

I have a python2 script with these lines: import androidhelper droid = androidhelper.Android() droid.webViewShow ( 'file:///sdcard/qpython/html/foo.html')

and the file 'foo.html' has a script that has this code: try { droid = new Android() ; alert ( "droid is good"); } catch(err) { alert ("error " + err.message) ; }

the file 'foo.html' shows ok in the browser but I get the alert error that Android is not an object

riverfor commented 5 years ago

Can you try

replace droid = new Android() ; with droid = new AndroidHelper() ?