Android Question App cannot be installed on Android 14

Status
Not open for further replies.

Tom_V

Member
Hello ;)
My app cannot be installed on Android 14.
Error messages:
1) This app was develeoped for older systems
2) This app is not compatible with your device
I tried everything, changed the manifest (Target SDK version 34), did implement the runtime permissions, permissions bluetooth....
Who can help me? I can also send the complete project and I can pay for solving this issue. I need this app working ASAP!
THANK YOU VERY MUCH IN ADVANCE!
 
Solution
My app cannot be installed on Android 14.
Installed in Android 14, there are permission issues. I went to the settings (phone) and manually adjusted them,
allowing various permissions such as Location, Music and Audio, Nearby Devices, and Photos and Videos. (I didn’t "think" about it, I simply allowed all the permissions) after that I installed the App.. there are more issues but the App run now

Tom_V

Member
Hi Erel, this is the Manifest editor code:

AddManifestText(
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-feature
android:glEsVersion="0x00020000"
android:required="true"/>
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:anyDensity="true"/>)

SetApplicationAttribute(android:minSdkVersion, "23")
SetApplicationAttribute(android:targetSdkVersion, "34")
SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:usesCleartextTraffic, "true")

AddPermission(android.permission.INTERNET)
AddPermission(android.permission.ACCESS_NETWORK_STATE)
AddPermission(android.permission.ACCESS_FINE_LOCATION)
AddPermission(android.permission.BLUETOOTH)
AddPermission(android.permission.BLUETOOTH_ADMIN)
AddPermission(android.permission.BLUETOOTH_ADVERTISE)
AddPermission(android.permission.BLUETOOTH_CONNECT)
AddPermission(android.permission.BLUETOOTH_SCAN)
AddPermission(com.google.android.providers.gsf.permission.READ_GSERVICES)

' Optional: Medien-Zugriff (Android 13+)
AddPermission(android.permission.READ_MEDIA_IMAGES)
AddPermission(android.permission.READ_MEDIA_VIDEO)
AddPermission(android.permission.READ_MEDIA_AUDIO)

' Für ältere Geräte (optional, bis Android 9)
AddPermission(android.permission.READ_EXTERNAL_STORAGE)
AddPermission(android.permission.WRITE_EXTERNAL_STORAGE)

AddManifestText(
<permission android:name="$PACKAGE$.permission.MAPS_RECEIVE" android:protectionLevel="signature"/>
<uses-feature android:glEsVersion="0x00020000" android:required="true"/>
<supports-screens android:largeScreens="true" android:normalScreens="true" android:smallScreens="true" android:anyDensity="true"/>
)

AddApplicationText(
<meta-data android:name="com.google.android.geo.API_KEY" android:value="AIzaSyBoiTRPe4sHKGrt4mmu01_cAE3yjb277m0"/>
<uses-library android:name="org.apache.http.legacy" android:required="false" />
)

AddReceiverText(s2,
<intent-filter>
<action android:name="android.bluetooth.device.action.ACL_DISCONNECTED"/>
</intent-filter>)
 
Upvote 0

teddybear

Well-Known Member
Licensed User
SetApplicationAttribute(android:minSdkVersion, "23")
SetApplicationAttribute(android:targetSdkVersion, "34")
Try to comment the 2lines and then add this
B4X:
'SetApplicationAttribute(android:minSdkVersion, "23")
'SetApplicationAttribute(android:targetSdkVersion, "34")
AddManifestText(<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="34"/>)
 
Upvote 1

Erel

B4X founder
Staff member
Licensed User
Longtime User
Try to comment the 2lines and then add this
B4X:
'SetApplicationAttribute(android:minSdkVersion, "23")
'SetApplicationAttribute(android:targetSdkVersion, "34")
AddManifestText(<uses-sdk android:minSdkVersion="23" android:targetSdkVersion="34"/>)
That's the correct answer.
 
Upvote 0

f0raster0

Well-Known Member
Licensed User
Longtime User
My app cannot be installed on Android 14.
Installed in Android 14, there are permission issues. I went to the settings (phone) and manually adjusted them,
allowing various permissions such as Location, Music and Audio, Nearby Devices, and Photos and Videos. (I didn’t "think" about it, I simply allowed all the permissions) after that I installed the App.. there are more issues but the App run now
 
Upvote 0
Solution

Tom_V

Member
The Manifest was the solution.
f0raster0 changed a few things in manifest, thanks!
android:minSdkVersion="26" android:targetSdkVersion="34"

I don´t understand why this not work:
'SetApplicationAttribute(android:minSdkVersion, "23")
'SetApplicationAttribute(android:targetSdkVersion, "34")

But I am happy that this is going to work:
AddManifestText(<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="34"/>)
 
Upvote 0

luthfiagata

Member
The Manifest was the solution.
f0raster0 changed a few things in manifest, thanks!
android:minSdkVersion="26" android:targetSdkVersion="34"

I don´t understand why this not work:
'SetApplicationAttribute(android:minSdkVersion, "23")
'SetApplicationAttribute(android:targetSdkVersion, "34")

But I am happy that this is going to work:
AddManifestText(<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="34"/>)
I have already tried following the steps you provided, and it was successfully installed on my device. However, I’m facing another issue: my application is unable to connect to the database I’ve set up. This problem keeps recurring, and even with the help of ChatGPT, I still haven’t found a solution.

this is my manifest code

manifest code:
AddManifestText(<uses-sdk android:minSdkVersion="26" android:compileSdkVersion="33" android:targetSdkVersion="34"/>)
AddManifestText(<supports-screens android:largeScreens="true"
                                  android:normalScreens="true"
                                  android:smallScreens="true"
                                  android:anyDensity="true"/>)

' Permissions for Android 13+
AddManifestText(<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />)
AddManifestText(<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />)
AddManifestText(<uses-permission android:name="android.permission.READ_MEDIA_AUDIO" />)

' For Android 12 and below
AddPermission("android.permission.READ_EXTERNAL_STORAGE")
AddPermission("android.permission.WRITE_EXTERNAL_STORAGE")

AddManifestText(<uses-feature android:name="android.hardware.telephony" android:required="true" />)
AddManifestText(<uses-feature android:name="android.hardware.camera" android:required="true" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.autofocus" android:required="true" />)
AddManifestText(<uses-feature android:name="android.hardware.camera.flash" android:required="false" />)

' Other necessary permissions
AddPermission("android.permission.ACCESS_COARSE_LOCATION")
AddPermission("android.permission.INTERNET")
AddPermission("android.permission.ACCESS_FINE_LOCATION")
AddPermission("android.permission.WAKE_LOCK")
AddPermission("android.permission.DEVICE_POWER")
AddPermission("android.permission.ACCESS_COARSE_UPDATES")
AddPermission("android.permission.READ_PHONE_STATE")
AddPermission("android.permission.VIBRATE")
AddPermission("android.permission.CAMERA")
AddPermission("android.permission.FLASHLIGHT")
AddPermission("android.hardware.camera")

SetApplicationAttribute(android:icon, "@drawable/icon")
SetApplicationAttribute(android:label, "$LABEL$")
SetApplicationAttribute(android:usesCleartextTraffic, "true")
CreateResourceFromFile(Macro, Themes.LightTheme)

and this is connection code
B4X:
    'Code module
    'Subs in this code module will be accessible from all modules.
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.
    
    Dim mh As MysqlHandler
    Dim rs As ResultSet
    Dim result As Int
End Sub

Sub koneksi
    mh.Initialize("myserver","mydatabase","username","password")
    Log("Coba koneksi ke database...")
    
    If mh.isConnected = False Then
        Log("Koneksi gagal!")
        result = Msgbox2("Oops, ada masalah dalam jaringan", "ERROR", "RELOAD", "", "Exit", LoadBitmap(File.DirAssets, "koneksi_error.png"))
        
        If result = DialogResponse.POSITIVE Then
            MsgboxAsync("Aplikasi ini memerlukan akses internet, nyalakan data atau hubungkan keWIFI", "WARNING")
        Else If result = DialogResponse.NEGATIVE Then
            MsgboxAsync("Aplikasi ini memerlukan akses internet, nyalakan data atau hubungkan keWIFI", "WARNING")
        End If
        
        ExitApplication
    Else
        Log("Koneksi berhasil!")
    End If
End Sub

'koneksi setelah instal gagal koneksi


Can anyone help me? pleasee
 
Upvote 0
Status
Not open for further replies.
Top