Publishing an .apk into IBM Application Center from Application Center command-line tools

110 Views Asked by At

I'm trying to publish an .apk into my Application Center through console. I've followed this note but it doesn't work in my environment:

https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/moving-production/distributing-mobile-applications-with-application-center/#cmdLineTools

If I type :

./acdeploytool.sh /home/miguel/Downloads/HelloWorldMyHelloAndroid.apk

I get this error message:

FWLAC0803E: Unable to connect: Connection refused Perhaps the server or context is wrongly specified. File:/home/myUser/Downloads/HelloWorldMyHelloAndroid.apk

And if I try another way using this java command:

java com.ibm.appcenter.Upload -f http://localhost:9080 -c applicationcenter -u demo -p demo /home/myUser/Downloads/HelloWorldMyHelloAndroid.apk

I get this one:

Error: Could not find or load main class com.ibm.appcenter.Upload

I don't get any errors when I do this 'publish' operation directly in Application Center or through MobileFirst Studio.

1

There are 1 best solutions below

0
On BEST ANSWER

Miguel, whether you use the script or the Java command, you need to specify the arguments to use. Please try the following:

./acdeploytool.sh -s http://localhost:9080 -c applicationcenter -u demo -p demo /home/miguel/Downloads/HelloWorldMyHelloAndroid.apk

I tried a similar command in my environment and was able to successfully deploy the apk to Application Center. If the command still does not work, make sure that the host/port that you are using are correct, and that the username and password are valid.

For the Java command that you executed, I see a few problems. First, the -cp argument needs to be specified in order to add the applicationcenterdeploytool.jar and json4j.jar files to the classpath. Next, the command shows "-f", but it should be "-s" to specify the server. Lastly, the path that was specified for the .apk is different than what you specified in the first command: myUser vs. miguel. So make sure that the correct path is used. If there are any further questions, let me know. Thanks.