Compile to create apk?

riflepwnage

New Member
trying to get a simple app to android market and i am just wondering why when i compile it doesn't create the apk unless i run and compile
 

nemiroG1

Member
Licensed User
Longtime User
I know this is old, and I know there are other various workarounds, but I, too, would love to see a simple selection in the Project menu to directly compile an APK file. Project -> Compile to APK or Project -> Compile (signed)
 
Upvote 0

DanteS

Member
Licensed User
Longtime User
I am working in my first application but I don't have any problem with the apk file.
Each time I need a new version I run with the option "relese" and the new apk file goes to the Obj sub directory, and this operation doesn't need to be connected to a device
 
Upvote 0

jimich

Member
Licensed User
Longtime User
I know this is old, and I know there are other various workarounds, but I, too, would love to see a simple selection in the Project menu to directly compile an APK file. Project -> Compile to APK or Project -> Compile (signed)

yes I agree.... compiling without running.
 
Upvote 0

nemiroG1

Member
Licensed User
Longtime User
At menu rightmost side, check pull down and you will see debug, release.

Have to edit this again, as I now see what you are talking about.

Towards the right side of the toolbar, there is a drop down box, with Debug (rapid) or Debug (legacy) as a default. Select Release in the drop down in the toolbar. Then go to Project -> Compile & Run. That will generate the APK, and then it will attempt to install the APK to the device, which then seems to fail. Close out of the errors, and then you will find the APK file in the Objects folder of your project. You can then copy that to your device(s).

Having a simple Compile button, rather than Compile & Run would seem to make sense. Having more selections in the Debug/Release drop down, or a sub-Menu from Project -> Compile, that would allow you to use the default B4A keys, or allow you to specify a different keystore file would make sense.

Perhaps a Test Release or final Signed Release Compile to APK function? This may seem like a completely obvious procedure for the writers/designers of B4A, but it is a confusing part of both B4A and Android/Java, in general. Sometimes little things that make it more obvious or easier to the user will help to 'de-mystify' a process, and make it that much more accessible to new users.

At any rate, thanks jimich for the lead in on this!


-Neil
 
Last edited:
Upvote 0
Top