TotalCross / totalcross

TotalCross is a Software Development Kit that helps cross platform application development. Currently supported platforms are: Windows, Wince, Android, iOS, Linux and Linux ARM for embedded systems.
https://www.totalcross.com
GNU Lesser General Public License v2.1
222 stars 40 forks source link

Missing Launcher.jar for Android deployment #340

Open erathke opened 3 years ago

erathke commented 3 years ago

Describe the bug

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

Devices:

To Reproduce

Perform a deployment for Android.

brunoamuniz commented 3 years ago

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?

erathke commented 3 years ago

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

brunoamuniz commented 3 years ago

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

erathke commented 3 years ago

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 commented 3 years ago

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