totalcross icon indicating copy to clipboard operation
totalcross copied to clipboard

Missing Launcher.jar for Android deployment

Open erathke opened this issue 3 years ago • 5 comments

Describe the bug

The file Launcher.jar for Android deployment is missing from SDKs 7.x.

Devices:

  • System OS (name and version): Debian/Linux 10
  • TotalCross Version: 7.x

To Reproduce

Perform a deployment for Android.

erathke avatar May 16 '21 22:05 erathke

Hey @erathke,

I just built the Printer sample app for Android using maven (pom.xml) and everything was fine (tc 7.1.0).

Are you using maven? what is the totalcross maven plugin version? Could paste the error?

brunoamuniz avatar May 17 '21 18:05 brunoamuniz

Hello @brunoamuniz ! Thank's for your reply. I'm not using maven, just the command line. The deployment process uses the file $TOTALCROSS3_HOME/etc/launchers/android/Launcher.jar, but the file does not exist. The SDK I get from the git releases page. I tried all 7.x versions. Then I get the error below:

[java] ################################# FATAL ERROR ################################## [java] tc.tools.deployer.DeployerException: File android/Launcher.jar not found! [java] at tc.tools.deployer.Deployer4Android.createLauncher(Deployer4Android.java:178) [java] at tc.tools.deployer.Deployer4Android.(Deployer4Android.java:143) [java] at tc.Deploy.(Deploy.java:94) [java] at tc.Deploy.main(Deploy.java:38) [java] ################################################################################ [java] Exception in thread "main" tc.tools.deployer.DeployerException: File android/Launcher.jar not found! [java] at tc.tools.deployer.Deployer4Android.createLauncher(Deployer4Android.java:178) [java] at tc.tools.deployer.Deployer4Android.(Deployer4Android.java:143) [java] at tc.Deploy.(Deploy.java:94) [java] at tc.Deploy.main(Deploy.java:38) [java] SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". [java] SLF4J: Defaulting to no-operation (NOP) logger implementation [java] SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. [java] File /home/erathke/TotalCross/git/Tests/dist/FancyApp.tcz written (32% - 3540 bytes) [java] Main class name: com/erdev/ui/FancyApp [java] Application title not provided, using: FancyApp [java] Application id not provided. Created from "FancyApp": gdOU [java] Application description: Tests [java] Java Result: 1

erathke avatar May 17 '21 20:05 erathke

if you are using command line directly you should use this parameter -android /n NameOfYourApplication /p /r

Please try this way and give me the results and also consider to change to use maven (pom.xml) =P

brunoamuniz avatar May 19 '21 20:05 brunoamuniz

Hi @brunoamuniz ! I was able to deploy with your instructions, thanks! But I did change the name of the file "$TOTALCROSS3_HOME/etc/tools/android/resources_singleapk.arsc" to "resources_singleApk.arsc". The deployer is looking for the last one.

erathke avatar May 22 '21 21:05 erathke

For TotalCross 7.0.0 I was able to deploy with maven as well. With TotalCross 7.1.0, I'm getting the error below:

[INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 4.154 s [INFO] Finished at: 2021-05-22T19:18:29-03:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.totalcross:totalcross-maven-plugin:2.0.2:package (post-package) on project FancyApp: Execution post-package of goal com.totalcross:totalcross-maven-plugin:2.0.2:package failed: The AWS Access Key Id you provided does not exist in our records. (Service: Amazon S3; Status Code: 403; Error Code: InvalidAccessKeyId; Request ID: FVC56161QKP7DY32; S3 Extended Request ID: zOiHro1Yi085gOwJ6zCi4UJ7uexngBVshEXeI1uiGVp0sr7OjUIhB40cJGODdVULnCz1XPcPOB8=) -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

erathke avatar May 22 '21 22:05 erathke