简体   繁体   中英

javascript code (phonegap app) work in Android 4.3 but not in Android 2.2

this javascript work perfect in Android 4.3, but not in Android 2.2, i not understand why (using via phonegap app)

var newLi = document.createElement("li");
var link = document.createElement('a');
link.href = "#"; 
link.innerHTML = (results.rows.item(i).CommonName);
newLi.appendChild(link);
olnew[0].appendChild(newLi);

thx

I'm not positive but I don't think that phonegap supports Android 2.2, maybe this is the problem. When you use Cordova to build your own app (Cordova is what Phonegap is built on top of), it will by default only target Android 2.3.3 and above (API level 10). I'm not sure if you can set the target sdk if you use Phonegap Build, but I bet if you add android:minSdkVersion="10" to the AndroidManifest.xml file it will work. I'd be interested to know if you can do this using PGB.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM