1

I have tested an Android application by connecting my PC to my smartphone ARCHOS Diamond. With Eclipse, from Java program including JavaFX, I can generate an .apk file by executing the install Gradle task.

But, this .apk is dedicated to my phone

Now, I want to spread my application on other Android phones. But I don't want to get as many kinds of phones for generating their .apk.

How can I do to generate .apk dedicated to HW and Android versions, without having these phones? And, if it possible to generate them, how to be sure that these apk work fine?

Thanks

Pascal DUTOIT
  • 121
  • 1
  • 13
  • In the `Gradle Task` view, check that `Show all Tasks` is set (the right-most view-toolbar entry - the tiny arrow-down symbol), then under `` > `other` > `android`. The description reads __"Generates a debug Android apk containing the JavaFX application"__. Or `androidInstall` do install the debug apk. Or `androidRelease` to create the apk for... Release... – dzim Jan 12 '17 at 14:09

1 Answers1

1

If you are using the Eclipse plugin.

Right click on the project > Android Tools > Export Signed Application Package

Follow the instructions for creating a .keystore file and you're sorted!

kanduken
  • 86
  • 1
  • 9
  • Are you sure? I mean, I have Andmore installed (the "successor" of the former Google-provided Android plugins) and there simply is no such menu. I'm on Eclipse Neon, btw. But what can be done: In the `Gradle Task` view, check that `Show all Tasks` is set (the right-most view-toolbar entry - the tiny arrow-down symbol), then under `` > `other` > `android`. The description reads __"Generates a debug Android apk containing the JavaFX application"__. Or `androidInstall` do install the debug apk. Or `androidRelease` to create the apk for... Release... – dzim Jan 12 '17 at 14:08
  • go through this video: https://www.youtube.com/watch?v=d3nfTc6lZYY, you will get the answer – kanduken Jan 12 '17 at 15:03
  • This is two years old. And Google stopped developing the ADT for eclipse since the move to Android Studio is finished. So there is only the Andmore project, aiming to do the same. I have installed that and the rules, that applied to Google's ADT don't apply to Andmore anymore. – dzim Jan 12 '17 at 16:19
  • Eclipse with its Gradle tasks (and not with ADT) provides a android Install command that allows to generate a code for a dedicated Android smartphone connected to the PC. That works's fine for me: I can test my code directly on my smartphone. The question is about generating codes for any smartphones i.e. generating code for a specific smartphone that is not connected to the PC. Reason: it is not possible to get ALL kinds of smartphones for checking the code on it. – Pascal DUTOIT Jan 13 '17 at 14:36
  • 1
    I don't really get your question: the apk you generate on the first place is not "dedicated" or specific to the connected device. In fact you can run the `android` task, and it will generate an apk without having any device connected. Once you distribute that apk by any means, including Google Play, it can be installed in any device. Is your question about testing your app on any possible device without even running on them? Like using an emulator for many different settings? – José Pereda Jan 14 '17 at 21:08
  • Clear, now! Thanks – Pascal DUTOIT Jan 17 '17 at 14:43