我正在使用 PhoneGap。并阅读它并创作了我的作品。
我在 MyworkActivity.java 中添加了这一行:
super.loadUrl("file:///android_asset/www/index.html");
但是当作为我的项目运行时,得到这个错误:
The method loadUrl(String) is undefined for the type Activity
我该如何解决?
最佳答案
当你使用PhoneGap
时,你的类是用DroidGap
而不是Activity
扩展的,所以请检查你是否扩展了你的类 Activity
。
关于java - Activity 类型未定义方法 loadUrl(String),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11329325/