0

我已经RequestFactory在我的 Android 应用程序中成功使用了很长时间,但是现在在尝试升级到 maps v2 时,当我包含

<fragment
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        class="com.google.android.gms.maps.SupportMapFragment" />

在我的 XML 布局文件中,出现错误:

01-25 08:08:41.978: E/AndroidRuntime(19854):
java.lang.RuntimeException: Unable to resume activity{com.xx/com.xx.MyActivity}:
java.lang.RuntimeException: The RequestFactory ValidationTool must be
run for the com.xx.client.MyRequestFactory RequestFactory type

如果我从布局 XML 文件中删除片段代码,一切正常。

这个片段如何影响我的 RequestFactory 验证,我该如何修复它?

谢谢。

4

1 回答 1

0

正如如何在 Android SyncAdapter 中使用 GWT-RequestFactory 中所指出的(总是得到 ValidationTool-Error)

如果添加

Thread.currentThread().setContextClassLoader(mContext.getClassLoader());

requestFactory = RequestFactorySource.create(factoryClass);

问题已解决。

于 2013-01-27T04:26:14.060 回答