开发者

App crashes because Android can't find a Java method, despite no problem at compile or install

My Android app runs fine, but:

If I insert a call to WebView.setScrollbarFadingEnabled, it crashes saying:

Could not find method android.webkit.WebView.setScrollbarFadingEnabled, referenced from [my class]
VFY: unable to resolve virtual method 289: Landroid/webkit/WebView;.setScrollbarFadingEnabled (Z)V

I am using Android 1.5, not a custom ROM.

My app defines minSdkVersion="3"

I always clean before compiling.

Is setScrollbarFadingEnabled unavailable in Android 1.5?

If so开发者_Python百科, why don't I receive a compiler error?


setScrollbarFadingEnabled is available from sdk 5 and onwards (android 2). For why you don't get compile errors, your project settings (not AndroidManifest.xml, your eclipse project settings) are probably set to compile against some higher SDK, not 1.5. If you set it to 1.5, it should give you the error properly.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜