【问题标题】:App Engine Connected Android App Warning: You must run the ValidationTool as part of your server build processApp Engine Connected Android App 警告:您必须在服务器构建过程中运行 ValidationTool
【发布时间】:2011-11-17 07:32:55
【问题描述】:

我在创建新的 App Engine Connected Android 应用后收到此警告:

Cannot fully validate context since domain type com.foo.server.HelloWorldService is not available.
You must run the ValidationTool as part of your server build process.

Add @SuppressWarnings("requestfactory") to dismiss.

因为它在共享文件夹中,所以在 Android 部分有一份副本,在 App Engine 部分有一份。警告仅出现在 Android 部分中的接口方法名称上:

package com.foo.client;

import com.google.web.bindery.requestfactory.shared.InstanceRequest;
import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.ServiceName;

import com.foo.shared.MessageProxy;
import com.foo.shared.RegistrationInfoProxy;

public interface MyRequestFactory extends RequestFactory {

  @ServiceName("com.foo.server.HelloWorldService")
  public interface HelloWorldRequest extends RequestContext {
    /**
     * Retrieve a "Hello, World" message from the server.
     */
    Request<String> getMessage();
  }

  @ServiceName("com.foo.server.RegistrationInfo")
  public interface RegistrationInfoRequest extends RequestContext {
    /**
     * Register a device for C2DM messages.
     */
    InstanceRequest<RegistrationInfoProxy, Void> register();

    /**
     * Unregister a device for C2DM messages.
     */
    InstanceRequest<RegistrationInfoProxy, Void> unregister();
  }

  @ServiceName("com.foo.server.Message")
  public interface MessageRequest extends RequestContext {
    /**
     * Send a message to a device using C2DM.
     */
    InstanceRequest<MessageProxy, String> send();
  }

  HelloWorldRequest helloWorldRequest();

  RegistrationInfoRequest registrationInfoRequest();

  MessageRequest messageRequest();
}

我正在使用 Google 在 Eclipse Classic 3.7 上提供的所有插件的最新(非测试版)版本(如建议的那样)。

什么是验证工具,如何运行它,这个警告是什么意思?

【问题讨论】:

    标签: java android google-app-engine gwt


    【解决方案1】:

    这是 GWT 2.4.0 中的新功能,请参阅 http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation

    ValidationTool 将生成一个 com.foo.client.MyRequestFactoryDeobfuscatorBuilder 类(或者,在 Android 客户端的情况下,可能是一个 com.foo.client.MyRequestFactoryDeobfuscatorBuilderLite),这是对上下文和代理类型进行编码和解码所需的,以及通过线路传入/传出混淆名称的方法.

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-05-14
      • 2013-04-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多