简体   繁体   English

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

[英]IBM Appcenter console apk fails to upload - Could not find android.aapt.dir

 [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)\\ } 

I am trying to upload an apt file to the IBM Appcenter console. 我正在尝试将apt文件上传到IBM Appcenter控制台。 It failed. 失败了 Received this error in Server log while upload. 上载时在服务器日志中收到此错误。

[3/19/15 11:13:29:116 CDT] 00000099 AAPT I findAAPT: Could not find a apt. [3/19/15 11:13:29:116 CDT] 00000099 AAPT我findAAPT:找不到合适的位置。 Please set property android.aapt or android.aapt.dir. 请设置属性android.aapt或android.aapt.dir。 [3/19/15 11:13:29:117 CDT] 00000099 AAPT I Resolving APK without AAPT [3/19/15 11:13:29:528 CDT] 00000099 UploadService E Exception during resource upload. [3/19/15 11:13:29:117 CDT] 00000099 AAPT I解析不带AAPT的APK [3/19/15 11:13:29:528 CDT] 00000099 UploadService E资源上传期间发生异常。 null [3/19/15 11:13:29:531 CDT] 00000099 UploadService E { "id": "68c1578b-2580-4bf3-a5d6-ab248ec646d3", "message": "FWLAC0000E: A server error was detected.", "productVersion": "6.1.0" } 空[3/19/15 11:13:29:531 CDT] 00000099 UploadService E {“” id“:” 68c1578b-2580-4bf3-a5d6-ab248ec646d3“,”消息“:” FWLAC0000E:检测到服务器错误。“ ,“ productVersion”:“ 6.1.0”}

Followed the below steps to configure the android.aapt.dir on WebSphere ND. 请按照以下步骤在WebSphere ND上配置android.aapt.dir。

  1. Copy the WL_INSTALL_DIR/ApplicationCenter/tools/android-sdk directory to a location in the config directory of the deployment manager's profile. 将WL_INSTALL_DIR / ApplicationCenter / tools / android-sdk目录复制到Deployment Manager的配置文件的config目录中的某个位置。 This will be propagated to the servers through the file synchronization service; 这将通过文件同步服务传播到服务器。 for example, WAS_INSTALL_DIR/profiles/Dmgr01/config/cells/cell-name/clusters/cluster-name/android-sdk. 例如WAS_INSTALL_DIR / profiles / Dmgr01 / config / cells / cell-name / clusters / cluster-name / android-sdk。
  2. Configure the environment entry android.aapt.dir with value ${USER_INSTALL_ROOT}/config/cells/cell-name/clusters/cluster-name/android-sdk. 使用值$ {USER_INSTALL_ROOT} / config / cells / cell-name / clusters / cluster-name / android-sdk配置环境条目android.aapt.dir。
  3. Click System administration > Nodes, select the nodes, and click Full Synchronize. 单击系统管理>节点,选择节点,然后单击完全同步。 Syncronized the node and restarted the WebSphere Server. 同步节点并重新启动WebSphere Server。 Still getting the same error while upload the apk. 上载apk时仍然出现相同的错误。

服务器配置属性的屏幕快照-IBM Application Center控制台

Worklight Server Consumer Edition Version: Fix Pack 6.1.0.2 IF 20150223_1217 Worklight Server消费者版版本:修订包6.1.0.2 IF 20150223_1217

First you should follow the correct user documentation topic. 首先,您应该遵循正确的用户文档主题。 This the is the topic for Worklight 6.1 . 这是Worklight 6.1的主题

You should optionally edit your question with screen shots showing the setup you have done for step 9 (for Websphere ND). 您应该选择使用屏幕快照来编辑您的问题,该屏幕快照显示您已针对步骤9(对于Websphere ND)完成了设置。

Note that android.aapt.dir should point to a folder that contains the subdirectories bin.linux-x86, bin.macosx-x86, bin.windows-x86. 请注意,android.aapt.dir应指向包含子目录bin.linux-x86,bin.macosx-x86,bin.windows-x86的文件夹。 Those subdirectories are in tools/android-sdk of your installation. 这些子目录位于您安装的tools / android-sdk中。

If you are on a different operating system than Linux, MacOs or Windows, Worklight does not provide the aapt tool and some fallback code is executed. 如果您使用的操作系统不同于Linux,MacO或Windows,则Worklight不提供aapt工具,并且会执行一些后备代码。 It could also be that when you copied the directory containing the aapt tool into WebSphere, the permissions got messed up and the aapt tool is no longer executable. 也可能是当您将包含aapt工具的目录复制到WebSphere时,权限混乱了,并且aapt工具不再可执行。 Then the fallback code is also executed. 然后,还执行后备代码。

An alternative way is to set the aapt location via the JNDI property android.aapt. 另一种方法是通过JNDI属性android.aapt设置aapt位置。 This should not point to the directory but to the tool itself. 这不应指向目录,而应指向工具本身。

To be on the safe side, note that in the description that you cite, the cell-name and cluster-name are just placeholders for the real names. 为了安全起见,请注意,在引用的描述中,单元名称和群集名称只是实名的占位符。 You need to use the real names that represent your installation. 您需要使用代表安装的真实名称。

The stack trace that you mention is in the fallback code. 您提到的堆栈跟踪在后备代码中。 It seems that the fallback code was not able to find or read the manifest file in the apk. 后备代码似乎无法在apk中找到或读取清单文件。 Even though it is in general better to use the aapt tool when available (via setting android.aapt or android.aapt.dir), this requires further investigation. 尽管通常最好使用aapt工具(通过设置android.aapt或android.aapt.dir)可用,但这仍需要进一步研究。 It could be that the uploaded APK file is corrupted or that the fallback code has a defect. 可能是上传的APK文件已损坏或后备代码存在缺陷。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM