Android Question Compile in Release mode problem [SOLVED]

ThRuST

Well-Known Member
Licensed User
Longtime User
Hi! I've installed B4A v12.50, JDK 11.0.1 (from B4X site) and started a new Android app (B4XPages).
After alot of testing I got my simple app running, it only generates a value and shows dishes accordingly (food app).

I should add that my Xiaomi Redmi Note 11 Pro phone runs on Android 13. I've granted permission in B4A-Bridge for unknown apps.
I have to uninstall/reinstall B4A-Bridge to get the app installed in either debug or release mode, but it only installs once.

Everytime I compile it completes successfully in the IDE compile window but it doesn't update whenever I make changes=no install app questions!
Anyone else experienced this problem? I haven't used B4A in years! After about one minutes compile time in debug mode the bottom log window
disappears when the debug mode running process ends.

Noticed the same problem when compiling a Default app. No icon/app is created on my phone after compile is successful!!
Debug mode runs using Java 11.0.1 and Android.x but no notification to install/update, and app doesn't open automatically after compiation!
The compiled app doesn't appear when I uninstall it and compile it again in debug mode.


/Roger

Here's screenshots to help solve the problem

1695589697076.png



Debug mode

1695590142509.png


Release mode

1695590034949.png


Manifest (taken from an old post)
'This code will be applied to the manifest file during compilation.
'You do not need to modify it in most cases.
'See this link for for more information: http://www.b4x.com/forum/showthread.php?p=78136
AddManifestText(
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="30"/>
<supports-screens android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>
<uses-permission
android:name="android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion="33" />)
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
'End of default text.

Even tested with Java 8 and Android 21 which no longer work to create a Default app!

1695596764095.png
 
Last edited:

OliverA

Expert
Licensed User
Longtime User
The first thing I would try is to create a new B4XPages app and change nothing. Just create a new project, add/remove nothing and compile/install it. What happens?
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
As you have installed B4A 12.50 after a long time, did you even got the new Android SDK + Resources?
It's a requirement if you come from a previous B4A version.
 
Upvote 0

ThRuST

Well-Known Member
Licensed User
Longtime User
I have now compiled a new B¤xPages app called Errortest1 just to try Oliver's solution.
I caught the compilation window with screencapture just after it completed successfully (which took a long time)!
System is a PC with Windows 10, i7 CPU, see the screendumps and specs at the bottom of this post.
This time no app showed up on my phone. It was connected and completed successfully.
My Redmi Note 11 Pro 5G phone runs Android 13 TKQ1.221114.001, MIUI v14.0.1 B4a-Bridge and have B4X Designer installed.

At compilation my phone used these settings:
Settings/Run automatically: B4A-Bridge run automatically : No
B4A Designer : no

Phone Settings/Apps:
B4A-Bridge
Run automatically : Yes
Full screen : No
Add shortcuts to homescreen: Disabled
Show on lockscreen : Disabled
Open new windows when run in background: Disabled
Show pop-up window: Enabled

No app was added to my phone after compilation completed successfully!
It might have to do with my phone settings. I have so far only accepted B4A-Bridge notify about install app from unknown sources and set app focus.
What settings do you have on your phone? Have you also experienced problems with Xiaomi upgrading from Android 12 to 13 and the new MIUI 14?
I have googled it and found out the users had the same problem when upgrading to Android 13 on Xiaomi MIUI 14 OS.
I will set up B4A on my new laptop and see how that works.

Btw I installed Android SDK's by running Android Studio v2022.3.1 Giraffe. SDK Manager is easily accessible from the welcome screen/More Actions tab.
To run B4A I have only installed Java 11 from B4X website and various Android versions, as seen in the config screen below.
Am I missing something?

Config
1695646227735.png


Manifest
1695646301671.png


Compilation window
1695646191322.png


System info
1695646392799.png
 
Last edited:
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
Which resources?
The Installationinstructions contains all relevant infos.


Btw I installed Android SDK's by running Android Studio v2022.3.1 Giraffe
You should not mix Android Studios SDK with the SDK used in B4X.

Follow the Installationinstructions carefully and everything is setup correctly. No need for Android Studio at all.
 
Upvote 0

ThRuST

Well-Known Member
Licensed User
Longtime User
Ok a quick message here. I got it working :) 👍👍
The problem was caused by the App settings for B4A-Bridge and B4A Designer.
I allowed all permissions in Phone Settings/App for B4A-Bridge and B4A Designer. That solved it.
I never experienced this problem with apps not showing up on my phone before I upgraded to Android 13 and MIUI 14.

Thanks to all of you.
 
Upvote 0
Top