- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我尝试添加一个带有 MvxListView 和绑定(bind)的 fragment 。我正在使用 v4.0.0.0 beta2。
这是布局:
<?xml version="1.0" encoding="utf-8"?>
<Mvx.MvxListView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
local:MvxItemTemplate="@layout/accountlistitem"
local:MvxBind="ItemsSource AllAccounts;ItemClick OpenOverviewCommand" />
fragment :
public class AccountListFragment : MvxFragment
{
public new AccountListViewModel ViewModel
{
get { return (AccountListViewModel)base.ViewModel; }
set { base.ViewModel = value; }
}
public override View OnCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
{
var ignore = base.OnCreateView(inflater, container, savedInstanceState);
return this.BindingInflate(Resource.Layout.AccountListLayout, null);
}
}
以及我如何在主要 Activity 中加载 fragment :
var fragmenTransaction = SupportFragmentManager.BeginTransaction();
fragmenTransaction.Add(Resource.Id.content_pane, accountListFragment);
fragmenTransaction.Commit();
这里是错误信息:
08-28 00:28:40.783 I/MonoDroid( 4281): Suppressed: java.lang.ClassNotFoundException: Mvx.MvxListView 08-28 00:28:40.783 I/MonoDroid( 4281): at java.lang.Class.classForName(Native Method) 08-28 00:28:40.783 I/MonoDroid( 4281): at java.lang.BootClassLoader.findClass(ClassLoader.java:781) 08-28 00:28:40.783 I/MonoDroid( 4281): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) 08-28 00:28:40.783 I/MonoDroid( 4281): at java.lang.ClassLoader.loadClass(ClassLoader.java:504) 08-28 00:28:40.783 I/MonoDroid( 4281): ... 29 more 08-28 00:28:40.783 I/MonoDroid( 4281): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
可以找到 GitHub 存储库 here
我错过了什么?我用另一个有工作 MvxListView 的项目检查了它,但没有发现任何区别......
最佳答案
尝试使用控件全名:
<?xml version="1.0" encoding="utf-8"?>
<cirrious.mvvmcross.binding.droid.views.MvxListView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:local="http://schemas.android.com/apk/res-auto"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
local:MvxItemTemplate="@layout/accountlistitem"
local:MvxBind="ItemsSource AllAccounts;ItemClick OpenOverviewCommand" />
关于android - MVVM 跨 java.lang.ClassNotFoundException : Mvx. MvxListView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32260540/
我的应用在尝试访问外部依赖项时遇到 NoClassDefFoundError,但仅限于作为 jar 运行时。 使用 Intellij,我有一个带有主类的简单应用程序,其中包含一些对外部依赖项(例如 s
我收到以下异常: java.lang.ClassNotFoundException: org.jboss.resteasy.plugins.server.servlet.ResteasyBootstr
我正在尝试使用eclipse和tomcat调试solr4.6源代码。我收到错误消息:HTTP 状态 500 - {msg=SolrCore 'collection1' 由于初始化失败而不可用:[sch
我是新来的,很抱歉我的英语不好;)。 我尝试使用以下代码在 java 中加载插件 jar: package testprogramm; import java.io.File; import java
我重新安装了 ADT Bundle,因为我在更新 eclipse 后遇到了一些问题。 现在,当我想测试我的应用程序时,出现以下异常: 06-05 10:33:35.770: E/AndroidRunt
我浏览过现有的帖子,这些帖子处理在 Eclipse 中的 Tomcat 下运行 Java Web 应用程序的 ClassNotFoundException。 我无法提供源代码和配置 Artifact
我忙于我的应用一个多星期,突然: 11-12 07:59:17.860 1653-1653/nl.test.myapp E/AndroidRuntime﹕ FATAL EXCEPTION: ma
我的应用程序有问题,昨天一切正常,但今天我更新了 sdk,现在当我尝试运行我的应用程序时,出现这样的错误 05-21 00:14:19.285: W/dalvikvm(7061): Unable t
我正在阅读 JPA docs在 Spring ,我正在尝试重组我的代码。 我现在所拥有的: BrewerRepository @Repository public class BrewerReposi
我想像 BalusC's example 一样实现 fileUpload . 不幸的是,我已经在努力声明 servlet。 Extensions Filter javax.faces
在某些机器上运行这个小程序不起作用,但在其他机器上它工作得很好。在所有情况下看起来都安装了 JRE 1.6.0_26。 var attributes = {codebase:'http://kas
我将跟随这个非常简单的教程(http://www.tutorialspoint.com/hadoop/hadoop_mapreduce.htm)一起学习,直到我尝试运行Java文件为止,一切运行良好。
我看到了帖子,并按照流程进行了操作。但这没有用。 ClassNotFoundException, while running example job of Hadoop 请帮助我。 创建的 mapre
我尝试在cloudera quickstart vm上为hadoop运行Mahout Kmeans示例。我在这里读link to clouudera block和这里stack overflow po
我有一个mapreduce程序,其中我使用Hcatalog从Hive表'A'中获取带有HcatInputFormat的详细信息,对其进行处理,然后使用HcatOutput格式将其写回到Hive表'B'
我是激发应用程序编程的新手,因此在这里为这个基本的编程而苦苦挣扎。 我有 scala ide 并附加了来自最新 hadoop 和 spark 发行版的相关 jar 文件。我正在使用的只有一个基本的 s
我正在尝试在本地模式下运行Spark示例,但是正在获取以下堆栈跟踪: Exception in thread "main" java.lang.NoClassDefFoundError: org/ap
我有以下代码: // Test TODO remove try { System.out.println(System.getProperties().getPrope
我有以下文件: src/my_proj/myns.clj: (ns my-proj.myns) (defrecord MyRecord [a b c]) 测试/my_proj/myns_test.c
我试图让应用程序动态加载某些类,然后调用启动方法,但问题是,由于 ClassLoader 不同,一个类无法调用另一个类的方法,但是正如我已经用 google 搜索的那样,我用父类创建了两个类加载器。这
我是一名优秀的程序员,十分优秀!