我想用这段代码填写字段,但它给了我错误
Account[] accounts = AccountManager.get(this).getAccounts();
for (Account account : accounts) {
// TODO: Check possibleEmail against an email regex or treat
// account.name as an email address only for certain account.type values.
String possibleEmail = account.name;
myWebView.setWebViewClient(new HelloWebViewClient());
setTitleColor(Color.GRAY); //the title bar color
myWebView.loadUrl("http://m.gmail.com");
myWebView.loadUrl("javascript: {document.getElementById('id_email').value ='"+possibleEmail+"'};");
}
它给了我这个错误
05-02 20:28:24.191:E/Web 控制台(1402):未捕获的类型错误:无法在 :1 处设置 null 的属性“值”
谢谢你的帮助