开发者

Can I parse uri from resource?

开发者 https://www.devze.com 2022-12-23 21:32 出处:网络
// startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.donate_url)))); startActivity(new Intent(Intent.ACTION_VIEW, Ur开发者_开发技巧i.parse(\"http://www.google.com\")));
// startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(getString(R.string.donate_url))));
startActivity(new Intent(Intent.ACTION_VIEW, Ur开发者_开发技巧i.parse("http://www.google.com")));

When I use the first,app will crash in emulator but the second run well, how can I fix the first?


both the lines are working fine.. tested in 2.1 emulator... with the donate_url= "http://www.google.com"

there must be problem with the url you are using...

check log cat as Pentium10 said.

0

精彩评论

暂无评论...
验证码 换一张
取 消