Android-приложение, подключенное к App Engine Предупреждение: вы должны запустить ValidationTool как часть процесса сборки вашего сервера - PullRequest
1 голос
/ 14 сентября 2011

Я получаю это предупреждение после создания нового приложения для Android, подключенного к App Engine:

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 (как предложено).).

Что такое средство проверки, как его запустить и что означает это предупреждение?

1 Ответ

1 голос
/ 15 сентября 2011

Это новое в GWT 2.4.0, см. http://code.google.com/p/google-web-toolkit/wiki/RequestFactoryInterfaceValidation

ValidationTool сгенерирует класс com.foo.client.MyRequestFactoryDeobfuscatorBuilder (или, в случае клиента Android, может быть com.foo.client.MyRequestFactoryDeobfuscatorBuilderLite), который необходим для кодирования и декодирования типов контекста и прокси, а также методов в / из запутанных имен по проводам. .

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...