【问题标题】:RequestFactory validation fails when including Android maps v2 fragment包含 Android 地图 v2 片段时,RequestFactory 验证失败
【发布时间】:2013-01-25 13:15:16
【问题描述】:

我已经在我的 Android 应用中成功使用 RequestFactory 很长时间了,但现在当我尝试升级到地图 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 验证,我该如何解决?

谢谢。

【问题讨论】:

标签: android requestfactory android-maps-v2


【解决方案1】:

正如How to Use the GWT-RequestFactory in Android SyncAdapter (always getting ValidationTool-Error)中指出的那样

如果有人添加

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

之前

requestFactory = RequestFactorySource.create(factoryClass);

问题已解决。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2014-09-23
    • 1970-01-01
    • 1970-01-01
    • 2018-12-15
    • 2013-04-24
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多