Compiling question...

malakie

Member
Licensed User
Longtime User
I am confused about the compiling options... I spent about 45 minutes going to the menu and trying all the compile options listed there... but none of them gave me the APK file needed to copy over and run on my phone.

Finally, out of a last ditch frustration, I used the green toolbar arrow for one last run at it... and viola the APK file suddenly appeared in the directory...

So what, exactly, is the difference and why do the menu selectable compile options not create an apk file? What am I not understanding about this?

One other question.. is there some info on how to create a ICON that displays on our phones for the app we create?

Thanks for any help..
 

malakie

Member
Licensed User
Longtime User
You do not need to copy the APK file. You should connect the IDE to the device (with B4A-Bridge or USB debugging).


I wanted to run the app by itself NOT connected to anything as a test. I also thank you for the Icon help too..
 
Upvote 0

malakie

Member
Licensed User
Longtime User
When you compile in release mode (Alt + 1 / Alt + 3 / Play button) then the APK is compiled and installed to the connected device. It is exactly the same as manually installing it.

OK but what if I want to deploy to other phones? Then I need to manually deploy it thus my question.
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
Isn't the apk file present at the objects folder of your project? It should be there, and you should set compile mode to 'release' or 'release obfuscated'.
 
Upvote 0

malakie

Member
Licensed User
Longtime User
Isn't the apk file present at the objects folder of your project? It should be there, and you should set compile mode to 'release' or 'release obfuscated'.

Yes I did finally find it but ONLY after using the green arrow to run it.. It does NOT appear using the MENU compile options and so I am confused about what they do...
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
You cannot have an apk if you don't compile your project. Compilation is done by clicking the 'compile' button, after choosing the option from the combobox. Please search for 'compiling options', surely there is an explanatory text for these options.
 
Upvote 0

malakie

Member
Licensed User
Longtime User
You cannot have an apk if you don't compile your project. Compilation is done by clicking the 'compile' button, after choosing the option from the combobox. Please search for 'compiling options', surely there is an explanatory text for these options.

Thus my confusion. Under the menu project, there are a number of 'compile' options. Any one of those 'runs' the app but does not create an .apk file. Only when I use the green toolbar button do I get an apk file.
 
Upvote 0

cthomas4579

Member
Licensed User
Longtime User
Running into the same problem here

I'm not getting an APK file from compiling. I only get a temp.ap_ file in the Objects\bin directory. Other posts have said to take this file and change the name to AppName.apk
Another thread mentioned a tutorial on applying my keystore file using the zipalign tool - ran through this tutorial and it generated a new .APK file but I'm getting a "App not installed" error when I attempt to side load it on my phone. The app compiles and runs fine when connected over the bridge, but again, attempting to copy it in (uninstall the bridge installed app on phone) and attempt to install the .APK generated through zipalign doesn't work.

Tried to install the temp.ap_ file after renaming it to AppName.apk also did not work

Its an UBER simple app, generates an email body - calls the email app.
Works great in emulator, and on phone through bridge compile.

Also, can anybody tell me why the damn name of the app wont change from b4a example.. :) ITS DRIVING ME NUTS

Yes, I'm new to this - been a process manufacturing software engineer for year - hence the need of basic for android :)
 
Upvote 0

malakie

Member
Licensed User
Longtime User
I'm not getting an APK file from compiling. I only get a temp.ap_ file in the Objects\bin directory. Other posts have said to take this file and change the name to AppName.apk
Another thread mentioned a tutorial on applying my keystore file using the zipalign tool - ran through this tutorial and it generated a new .APK file but I'm getting a "App not installed" error when I attempt to side load it on my phone. The app compiles and runs fine when connected over the bridge, but again, attempting to copy it in (uninstall the bridge installed app on phone) and attempt to install the .APK generated through zipalign doesn't work.

Tried to install the temp.ap_ file after renaming it to AppName.apk also did not work

Its an UBER simple app, generates an email body - calls the email app.
Works great in emulator, and on phone through bridge compile.

Also, can anybody tell me why the damn name of the app wont change from b4a example.. :) ITS DRIVING ME NUTS

Yes, I'm new to this - been a process manufacturing software engineer for year - hence the need of basic for android :)

Whew so I am not the only one seeing this... I am NOT crazy, said the man to himself...... :sign0060:
 
Upvote 0

mc73

Well-Known Member
Licensed User
Longtime User
I'm not getting an APK file from compiling. I only get a temp.ap_ file in the Objects\bin directory. Other posts have said to take this file and change the name to AppName.apk
You can find the apk simply in the objects folder, not the bin subfolder. But perhaps I am missing something here.
 
Upvote 0

malakie

Member
Licensed User
Longtime User
You can find the apk simply in the objects folder, not the bin subfolder. But perhaps I am missing something here.

Actually that is what we are talking about.. there is no APK file generated anywhere using the Menu compile options... ONLY when using the green toolbar button.
 
Upvote 0

cthomas4579

Member
Licensed User
Longtime User
Actually that is what we are talking about.. there is no APK file generated anywhere using the Menu compile options... ONLY when using the green toolbar button.

Ok.. I got it nailed after returning to the basics.. Went back and read the "Helloworld" tutorial.. :) and they mentioned compiling with the F5 key. Not sure why or how thats different from the compiles in the drop down but it is.. The compile output had a great deal of info embedded in it that didn't show up with any other compiles.

Presto - I have an apk file that installed perfectly.

and it was in the objects folder.
 
Upvote 0

malakie

Member
Licensed User
Longtime User
Ok.. I got it nailed after returning to the basics.. Went back and read the "Helloworld" tutorial.. :) and they mentioned compiling with the F5 key. Not sure why or how thats different from the compiles in the drop down but it is.. The compile output had a great deal of info embedded in it that didn't show up with any other compiles.

Presto - I have an apk file that installed perfectly.

and it was in the objects folder.

Good to know... As I mentioned you can also just click the green arrow button on the toolbar too. That worked for me as well... Like you just the menu selections do not work as I expected..
 
Upvote 0
Top