IBM Appcenter控制台apk无法上传 - 找不到android.aapt.dir

时间:2015-03-24 16:21:10

标签: android ibm-mobilefirst worklight-appcenter



[3/24/15 12:23:23:706 CDT] 00000098 AAPT          I   Resolving APK without AAPT\
[3/24/15 12:23:23:936 CDT] 00000098 UploadService E   Exception during resource                                                                                                  upload. null\
[3/24/15 12:23:23:937 CDT] 00000098 UploadService E   \{\
        "id": "86266e14-c273-4268-97a2-d1d6861e96d2",\
        "message": "FWLAC0000E: A server error was detected.",\
        "productVersion": "6.1.0"\
\}\
                                 java.lang.NullPointerException\
        at java.util.HashMap.putAll(HashMap.java:735)\
        at com.ibm.puremeap.services.UploadService.putAll(UploadService.java:313                                                                                                 )\
        at com.ibm.puremeap.services.UploadService.fileUploaded(UploadService.ja                                                                                                 va:153)\
        at com.ibm.puremeap.services.UploadService.__fileUploadedJSON__(UploadSe                                                                                                 rvice.java:106)\
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.                                                                                                 java:60)\
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces                                                                                                 sorImpl.java:37)\
        at java.lang.reflect.Method.invoke(Method.java:611)\
        at org.apache.wink.server.internal.handlers.InvokeMethodHandler.handleRe                                                                                                 quest(InvokeMethodHandler.java:63)\
        at org.apache.wink.server.handlers.AbstractHandler.handleRequest(Abstrac                                                                                                 tHandler.java:33)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.internal.handlers.CreateInvocationParametersHa                                                                                                 ndler.handleRequest(CreateInvocationParametersHandler.java:54)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.handlers.AbstractHandler.handleRequest(Abstrac                                                                                                 tHandler.java:34)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.ha                                                                                                 ndleSubResourceMethod(FindResourceMethodHandler.java:183)\
        at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.ha                                                                                                 ndleRequest(FindResourceMethodHandler.java:110)\
        at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.ha                                                                                                 ndleSubResourceLocator(FindResourceMethodHandler.java:230)\
        at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.ha                                                                                                 ndleRequest(FindResourceMethodHandler.java:115)\
        at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.ha                                                                                                 ndleSubResourceLocator(FindResourceMethodHandler.java:230)\
        at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.ha                                                                                                 ndleRequest(FindResourceMethodHandler.java:115)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.internal.handlers.FindRootResourceHandler.hand                                                                                                 leRequest(FindRootResourceHandler.java:95)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.internal.handlers.HeadMethodHandler.handleRequ                                                                                                 est(HeadMethodHandler.java:53)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.internal.handlers.OptionsMethodHandler.handleR                                                                                                 equest(OptionsMethodHandler.java:46)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.internal.handlers.SearchResultHandler.handleRe                                                                                                 quest(SearchResultHandler.java:33)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.internal.log.ResourceInvocation.handleRequest(                                                                                                 ResourceInvocation.java:92)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.internal.log.Requests.handleRequest(Requests.j                                                                                                 ava:76)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:26)\
        at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHa                                                                                                 ndlersChain.java:22)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(Abstrac                                                                                                 tHandlersChain.java:67)\
        at org.apache.wink.server.handlers.AbstractHandlersChain.run(AbstractHan                                                                                                 dlersChain.java:52)\
        at org.apache.wink.server.internal.RequestProcessor.handleRequestWithout                                                                                                 FaultBarrier(RequestProcessor.java:207)\
        at org.apache.wink.server.internal.RequestProcessor.handleRequest(Reques                                                                                                 tProcessor.java:154)\
        at org.apache.wink.server.internal.servlet.RestServlet.service(RestServl                                                                                                 et.java:133)\
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:668)\
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper                                                                                                 .java:1230)\
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletW                                                                                                 rapper.java:779)\
        at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletW                                                                                                 rapper.java:478)\
        at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(Serv                                                                                                 letWrapperImpl.java:178)\
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.invokeTarget(WebAppF                                                                                                 ilterChain.java:136)\
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilte                                                                                                 rChain.java:97)\
        at com.ibm.puremeap.services.RestFilter.doFilter(RestFilter.java:60)\
        at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterI                                                                                                 nstanceWrapper.java:195)\
        at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilte                                                                                                 rChain.java:91)\
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFil                                                                                                 terManager.java:960)\
        at com.ibm.ws.webcontainer.filter.WebAppFilterManager.invokeFilters(WebA                                                                                                 ppFilterManager.java:1064)\
        at com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(Cac                                                                                                 heServletWrapper.java:87)\
        at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:                                                                                                 909)\
        at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.j                                                                                                 ava:1662)\
        at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.jav                                                                                                 a:200)\
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimina                                                                                                 tion(HttpInboundLink.java:459)\
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest                                                                                                 (HttpInboundLink.java:526)\
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(H                                                                                                 ttpInboundLink.java:312)\
        at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboun                                                                                                 dLink.java:283)\
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDi                                                                                                 scriminators(NewConnectionInitialReadCallback.java:214)\
        at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete                                                                                                 (NewConnectionInitialReadCallback.java:113)\
        at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted                                                                                                 (AioReadCompletionListener.java:175)\
        at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFutu                                                                                                 re.java:217)\
        at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChanne                                                                                                 lFuture.java:161)\
        at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)\
        at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)\
        at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.j                                                                                                 ava:775)\
        at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)\
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1862)\
}




我正在尝试将apt文件上传到IBM Appcenter控制台。它失败了。上传时在服务器日志中收到此错误。

  

[3/19/15 11:13:29:116 CDT] 00000099 AAPT我发现AAPT:找不到apt。请设置属性android.aapt或android.aapt.dir。   [3/19/15 11:13:29:117 CDT] 00000099 AAPT我解决APK没有AAPT   [3/19/15 11:13:29:528 CDT] 00000099 UploadService E资源上传期间的例外情况。空值   [3/19/15 11:13:29:531 CDT] 00000099 UploadService E {           " id":" 68c1578b-2580-4bf3-a5d6-ab248ec646d3",           " message":" FWLAC0000E:检测到服务器错误。",           " productVersion":" 6.1.0"   }

按照以下步骤在WebSphere ND上配置android.aapt.dir。

  1. 将WL_INSTALL_DIR / ApplicationCenter / tools / android-sdk目录复制到Deployment Manager的配置文件的config目录中的某个位置。这将通过文件同步服务传播到服务器;例如,WAS_INSTALL_DIR / profiles / Dmgr01 / config / cells / cell-name / clusters / cluster-name / android-sdk。
  2. 使用值$ {USER_INSTALL_ROOT} / config / cells / cell-name / clusters / cluster-name / android-sdk配置环境条目android.aapt.dir。
  3. 点击系统管理>节点,选择节点,然后单击“完全同步”。 同步节点并重新启动WebSphere Server。上传apk时仍然会出现相同的错误。
  4. Screenshot of server configuration property - IBM Application Center Console

    Worklight Server Consumer Edition版本:Fix Pack 6.1.0.2 IF 20150223_1217

2 个答案:

答案 0 :(得分:0)

首先,您应该遵循正确的用户文档主题。 This the is the topic for Worklight 6.1

您应该选择使用屏幕截图编辑您的问题,屏幕截图显示您为步骤9(针对Websphere ND)所做的设置。

答案 1 :(得分:0)

请注意,android.aapt.dir应指向包含子目录bin.linux-x86,bin.macosx-x86,bin.windows-x86的文件夹。这些子目录位于您安装的tools / android-sdk中。

如果您使用的操作系统与Linux,MacO或Windows不同,则Worklight不提供aapt工具,并且会执行一些后备代码。也可能是当您将包含aapt工具的目录复制到WebSphere时,权限被搞砸了,并且aapt工具不再可执行。然后还执行回退代码。

另一种方法是通过JNDI属性android.aapt设置aapt位置。这不应该指向目录,而是指向工具本身。

为安全起见,请注意,在您引用的说明中,cell-name和cluster-name只是实名的占位符。您需要使用代表您的安装的真实姓名。

您提到的堆栈跟踪位于后备代码中。似乎后备代码无法在apk中查找或读取清单文件。尽管在可用时通常更好地使用aapt工具(通过设置android.aapt或android.aapt.dir),但这需要进一步调查。可能是上传的APK文件已损坏或后备代码存在缺陷。