- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试使我的应用向后兼容 Android 2.2。
我有 Fragments、ListFragments、FragmentPagerAdapter 和 ActionBarSherlock 都在发生。
我已经包含了 android 支持库,并且构建在我的 android 4.1 设备上完美运行,但在 2.2 设备上,我得到以下信息:
09-21 00:10:32.867: I/dalvikvm(1229): Failed resolving Lanother/music/player/AlbumListFragment; interface 521 'Landroid/widget/SearchView$OnQueryTextListener;'
09-21 00:10:32.877: W/dalvikvm(1229): Link of class 'Lanother/music/player/AlbumListFragment;' failed
09-21 00:10:32.877: E/dalvikvm(1229): Could not find class 'another.music.player.AlbumListFragment', referenced from method another.music.player.MainActivity.<init>
09-21 00:10:32.877: W/dalvikvm(1229): VFY: unable to resolve new-instance 531 (Lanother/music/player/AlbumListFragment;) in Lanother/music/player/MainActivity;
09-21 00:10:32.877: I/dalvikvm(1229): Could not find method another.music.player.MainActivity.getActionBar, referenced from method another.music.player.MainActivity.onCreate
09-21 00:10:32.887: W/dalvikvm(1229): VFY: unable to resolve virtual method 3906: Lanother/music/player/MainActivity;.getActionBar ()Landroid/app/ActionBar;
09-21 00:10:32.887: I/dalvikvm(1229): Failed resolving Lanother/music/player/AlbumListFragment; interface 521 'Landroid/widget/SearchView$OnQueryTextListener;'
09-21 00:10:32.887: W/dalvikvm(1229): Link of class 'Lanother/music/player/AlbumListFragment;' failed
09-21 00:10:32.887: E/dalvikvm(1229): Could not find class 'another.music.player.AlbumListFragment', referenced from method another.music.player.MainActivity.onListItemClicked
09-21 00:10:32.887: W/dalvikvm(1229): VFY: unable to resolve new-instance 531 (Lanother/music/player/AlbumListFragment;) in Lanother/music/player/MainActivity;
09-21 00:10:32.887: I/dalvikvm(1229): Failed resolving Lanother/music/player/SongListFragment; interface 521 'Landroid/widget/SearchView$OnQueryTextListener;'
09-21 00:10:32.887: W/dalvikvm(1229): Link of class 'Lanother/music/player/SongListFragment;' failed
09-21 00:10:32.887: E/dalvikvm(1229): Could not find class 'another.music.player.SongListFragment', referenced from method another.music.player.MainActivity.onListItemClicked
09-21 00:10:32.887: W/dalvikvm(1229): VFY: unable to resolve new-instance 576 (Lanother/music/player/SongListFragment;) in Lanother/music/player/MainActivity;
09-21 00:10:32.887: I/dalvikvm(1229): Could not find method another.music.player.MainActivity.getActionBar, referenced from method another.music.player.MainActivity.onOptionsItemSelected
09-21 00:10:32.887: W/dalvikvm(1229): VFY: unable to resolve virtual method 3906: Lanother/music/player/MainActivity;.getActionBar ()Landroid/app/ActionBar;
09-21 00:10:32.887: I/dalvikvm(1229): Failed resolving Lanother/music/player/AlbumListFragment; interface 521 'Landroid/widget/SearchView$OnQueryTextListener;'
09-21 00:10:32.887: W/dalvikvm(1229): Link of class 'Lanother/music/player/AlbumListFragment;' failed
09-21 00:10:32.887: E/dalvikvm(1229): Could not find class 'another.music.player.AlbumListFragment', referenced from method another.music.player.MainActivity.onOptionsItemSelected
09-21 00:10:32.887: W/dalvikvm(1229): VFY: unable to resolve new-instance 531 (Lanother/music/player/AlbumListFragment;) in Lanother/music/player/MainActivity;
09-21 00:10:32.897: I/dalvikvm(1229): Could not find method android.support.v4.app.FragmentActivity.getActionBar, referenced from method another.music.player.ArtistListFragment.onListItemClick
09-21 00:10:32.897: W/dalvikvm(1229): VFY: unable to resolve virtual method 810: Landroid/support/v4/app/FragmentActivity;.getActionBar ()Landroid/app/ActionBar;
我已经研究了好几个小时了,但我就是不知道该尝试什么。任何建议表示赞赏。如果您需要查看一些代码,请告诉我。
谢谢。
最佳答案
我在阅读自己的 SO 问题后意识到,我没有正确解释以下内容:
09-21 00:10:32.867: I/dalvikvm(1229): Failed resolving Lanother/music/player/AlbumListFragment; interface 521 'Landroid/widget/SearchView$OnQueryTextListener;
ActionBarSherlock 似乎不支持 onQueryTextListener 和其他一些元素。反正我不需要这些方法,所以我把它们从ativity中去掉,问题就解决了。
我想 4.1 设备原生支持 onQueryTextChange,但在 2.2 设备上(ActionBarsherlock 支持 actionBar),这些方法不受支持。
关于android - 在 2.2 错误上运行 fragment - 找不到类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12514556/
例如,我有一个父类Author: class Author { String name static hasMany = [ fiction: Book,
代码如下: dojo.query(subNav.navClass).forEach(function(node, index, arr){ if(dojo.style(node, 'd
我有一个带有 Id 和姓名的学生表和一个带有 Id 和 friend Id 的 Friends 表。我想加入这两个表并找到学生的 friend 。 例如,Ashley 的 friend 是 Saman
我通过互联网浏览,但仍未找到问题的答案。应该很容易: class Parent { String name Child child } 当我有一个 child 对象时,如何获得它的 paren
我正在尝试创建一个以 Firebase 作为我的后端的社交应用。现在我正面临如何(在哪里?)找到 friend 功能的问题。 我有每个用户的邮件地址。 我可以访问用户的电话也预订。 在传统的后端中,我
我主要想澄清以下几点: 1。有人告诉我,在 iOS 5 及以下版本中,如果您使用 Game Center 设置多人游戏,则“查找 Facebook 好友”(如与好友争夺战)的功能不是内置的,因此您需要
关于redis docker镜像ENTRYPOINT脚本 docker-entrypoint.sh : #!/bin/sh set -e # first arg is `-f` or `--some-
我是一名优秀的程序员,十分优秀!