LAMW: [SOLVED] This app isn't compatible/Slow with Android 14
lazarus / 43-Android
----------------------------------------------------------------------
c4p · 2024-01-30 07:28
Upgraded my phone today and now have Android 14 and my app is
slow/jittery, it does run but keeps coming up with 'This app isn't
compatible with the latest version of Android. Check for an update or
contact the app developer'. every time you install it manually and run
it and the performance is terrible, like really bad. I have a Samsung
A14 so not sure, other apps work fine on the phone so assuming it's my
LAMW config, and my app runs smooth on my old Pixel running Android
12. I have disabled everything on startup and anything that could
cause performance issues like badly written OnDrawItemBitmap code etc.
but still the same.
Normally I would know how to sort this, ensure latest Platform API is
installed to the SDK folder, checked Java JDK with different versions.
I have SDK platforms android-30 to android-34 including android--ext8
including android-34-ext10, as I say it runs, just really badly and
the 'This app isn't compatible' nag message when you install it first
time. Tried JDK 8 to 21, no difference, also a few Gradle versions but
no joy.
Done a cleanup/build, tested fresh app and does same on Android 14,
also Theme Default or compat makes no difference....really annoying, I
wish I could roll back the phone update. Like I say, works perfect on
my other Android 12 phone.
Up to speed on minimum SDK and Target SDK etc. so it's not that, have
also tried other combinations but no difference. I am doing this in
Debug mode, not release.
TargetSDK - 34
MinSDK - 23
Windows 10, Lazarus v2.0.12 r64642 LAMW v0.8.6.4
Not seeing anything in the behaviour changes that are screaming at me
here: https://developer.android.com/about/versions/14/behavior-
changes-all
What am I missing? any ideas?
Posting this in desperation as it's game over for me at the moment in
terms of using LAMW on API34.
Solution: The Panel component caused the slowness, took all the Panels
out and it resolved the issue, super quick now!
----------------------------------------------------------------------
marcos-ebm · 2024-01-30 12:31
[using the translator]
I don't know how to help you, but I saw that you are using LAMW
0.8.6.3
Did you try to update LAMW to the new version 0.8.6.4??
----------------------------------------------------------------------
c4p · 2024-01-30 18:28
Sorry, that was a typo, should have been v0.8.6.4, I have corrected
it. Yes, I'm on the latest LAMW.
App runs but shows 'App isn't compatible...' and sluggish performance
like there is an interrupt slicing the CPU.
App runs perfect on Android 11 and 12 (different devices), but not on
Android 14, slow/sluggish and App isn't compatible nag screen.
Permissions in use:
Service:
Nothing else weird in the Manifest, this is an app requiring internet
access to download content, nothing fancy going on.
I notice a slow response on rotate and scrolling is 'sticky' or
'jittery' not very technical terms I know, but this shows there is
something going on with Android 14, I don't have another physical
Android 14 device to test but all other apps on my Android 14 device
work fine.
I have also tested a newer NDK but same issue.
I will keep testing though.
----------------------------------------------------------------------
jmpessoa · 2024-01-31 01:16
What about
change "MinSDK - 23" to "MinSDK - 24" ?
PS. What about your LAMW setup? (JDK version, gradle version, Android
SDK version...)
----------------------------------------------------------------------
c4p · 2024-01-31 08:54
I tried changing the MinSDK to API24, but no difference.
Tried a few different combos but generally use JDK 21 and Gradle 8.5
(also tried a few others), Android version, I have tried LAMW Manager
stock, Android Studio stock etc. and have Platforms 30-34-ext10, no
change on any of them, still sluggish performance and App isn't
compatible....also tried NDK 22 and 24.
I have no clue what's causing this, only happens on Android 14, was
also working fine on Android 13 before the upgrade and works perfect
on Android 12 on my other device.
----------------------------------------------------------------------
jmpessoa · 2024-01-31 16:54
Well, Android Studio "Hedgehog" use JDK 17 and gradle >= 8.2.1 and
Target 34 (but Target 33 is the official for
"Play Store")
You can try open your LAMW project in Android Studio "Hedgehog" (just
point up your project folder)
and then "build" and install your Apk....
Maybe we will learn about what is not correct in your application...
----------------------------------------------------------------------
c4p · 2024-02-01 09:21
I reinstalled LAMW using lamw_manager and get the same result.
Loading project in Android Studio results in the following:
* What went wrong:
A problem occurred evaluating root project 'AppLAMWProject24'.
> Failed to apply plugin 'com.android.internal.version-check'.
> Minimum supported Gradle version is 8.2. Current version is 8.0.
If using the gradle wrapper, try editing the distributionUrl in
C:\Users\User\LAMWProjects\AppLAMWProject24\gradle\wrapper\gradle-
wrapper.properties to gradle-8.2-all.zip
Also that gradle-wrapper.properties path doesn't exist but may be an
Android Studio compatibility issue expecting to see that.
My version isn't 8.0 it's 8.5.
I reinstalled LAMW in a different folder and I get the exact same
issue as with my current one using Android 14, only seen this issue on
Android 14, not below.
I also deleted the .gradle directory in my project and user profile,
but makes no difference on recreation.
Also worth mentioning that after deleting, the wrapper > dists folder
in C:\Users\User\.gradle still shows gradle-8.0-bin folder, although
that may be something or nothing, I was expecting to see
gradle-8.5-bin.
----------------------------------------------------------------------
jmpessoa · 2024-02-01 16:39
Ok.
Create a new LAMW project and send me the "build.gradle" file....
and if possible, do the same using "Android Studio" and send me the
"build.gradle" file, too.
----------------------------------------------------------------------
c4p · 2024-02-02 11:36
LAMW: build.gradle
buildscript {
repositories {
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.0'
}
}
allprojects {
repositories {
jcenter()
google()
mavenCentral()
maven {url 'https://jitpack.io'}
}
}
apply plugin: 'com.android.application'
android {
namespace "org.lamw.applamwproject29"
splits {
abi {
enable true
reset()
include 'armeabi-v7a'
universalApk false
}
}
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
compileSdk 34
defaultConfig {
minSdkVersion 23
targetSdkVersion 34
versionCode 6682784
versionName "1.0"
multiDexEnabled true
ndk { debugSymbolLevel 'FULL' }
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
buildTypes {
debug {
minifyEnabled false
debuggable true
jniDebuggable true
}
release {
minifyEnabled false
debuggable false
jniDebuggable false
}
}
buildFeatures {
aidl true
}
lint {
abortOnError false
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.google.android.material:material:1.11.0'
}
tasks.register('run', Exec) {
dependsOn ':installDebug'
if (System.properties['os.name'].toLowerCase().contains('windows'))
{
commandLine 'cmd', '/c', 'adb', 'shell', 'am', 'start', '-n',
"org.lamw.applamwproject29/.App"
} else {
commandLine 'adb', 'shell', 'am', 'start', '-n',
"org.lamw.applamwproject29/.App"
}
}
wrapper {
gradleVersion = '8.5'
}
Android Studio Gradle build.gradle.kts:
plugins {
id("com.android.application")
id("org.jetbrains.kotlin.android")
}
android {
namespace = "com.example.myapplication"
compileSdk = 34
defaultConfig {
applicationId = "com.example.myapplication"
minSdk = 34
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner =
"androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-
optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
buildFeatures {
viewBinding = true
}
}
dependencies {
implementation("androidx.core:core-ktx:1.10.1")
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.9.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
implementation("androidx.lifecycle:lifecycle-livedata-ktx:2.6.1")
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.1")
implementation("androidx.navigation:navigation-fragment-
ktx:2.6.0")
implementation("androidx.navigation:navigation-ui-ktx:2.6.0")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-
core:3.5.1")
}
----------------------------------------------------------------------
c4p · 2024-02-05 20:36
I'm giving up on this for now on Android 14 and reverting to Android
12 for dev work, an absolute pain as Android 14 is my main phone. I
have tried everything to get around this and totally stuck, can anyone
else confirm that if when you install the app manually it doesn't come
up with 'App isn't compatible....' on Android 14? and I am also
getting slow/sluggish response times on Android 14 compared to any
lower API, which works perfect for me, no issues.
I tried a full reinstall using lamw_manager and same issue.
If someone comes back saying "No problems here on Android 14" I would
like to know your config please.
----------------------------------------------------------------------
jmpessoa · 2024-02-06 03:16
I found some info here:
https://stackoverflow.com/questions/77818852/this-app-isnt-compatible-
with-the-latest-version-of-android-in-android-14
What about "arm64-v8a" build ?
----------------------------------------------------------------------
c4p · 2024-02-06 20:31
Added 'arm64-v8a' below to build.gradle:
Code: Pascal [Select][+][-]window.onload = function(){var x1 =
document.getElementById("main_content_section"); if (x1) { var x =
document.getElementsByClassName("geshi");for (var i = 0; i include
'armeabi-v7a', 'arm64-v8a'
Didn't help unfortunately, crashes app on startup, only works with
include 'armeabi-v7a' even after a clean up/build.
It does generate each apk fine, just doesn't run with arm64 apk, on my
device anyway.
----------------------------------------------------------------------
jmpessoa · 2024-02-06 21:32
QuoteAdded 'arm64-v8a' below to build.gradle....
There is some libcontrols.so in project folder /lib/arm64-v8a?
Quotejust doesn't run with arm64 apk, on my device anyway.
What is your device chip?
----------------------------------------------------------------------
c4p · 2024-02-06 21:35
QuoteThere is some libcontrols.so in project folder /lib/arm64-v8a?
No folder is empty, and on a fresh project.
Device is Samsung Galaxy A14, Mediatek MT6769 Helio G80, got this from
an app to interrogate the chipset.
Also says ABI supported are: arm64-v8a, armeabi-v7a, armeabi.
----------------------------------------------------------------------
jmpessoa · 2024-02-06 21:56
QuoteNo folder is empty, and on a fresh project.
Well, you can select "arm64-v8a" on building a fresh project.....
and test it!
----------------------------------------------------------------------
c4p · 2024-02-06 22:13
Progress, the 'App isn't compatible' is gone if built with Aarch64
chipset, but sluggishness is still present.
I will carry out further tests, thank you!
----------------------------------------------------------------------
c4p · 2024-02-13 23:25
Was great to get rid of the 'App is not compatible' but the
sluggishness is still there and have gone over and over but can't find
anything wrong with my code and works perfect on lower APIs, just not
on Android 14.
You may not immediately notice it, but if you compare a LAMW app on a
slower phone on Android 12 it will easily outperform the LAMW app on
Android 14 on a faster phone (on my phone at least, a Samsung A14
Galaxy which was super quick on Android 13 before the upgrade, other
apps are fine on the phone though)....like rotating a video for
example, Android 12 completes the task quicker on a slower phone than
a faster phone on Android 14, and scrolling with a jListView with
image/widget is sticky.
I instantly noticed the issue after the phone Android upgrade to 14.
I have also checked this but nothing helps:
https://developer.android.com/about/versions/14/behavior-changes-14
Does anyone have any ideas?
----------------------------------------------------------------------
dseligo · 2024-02-14 00:27
Quote from: c4p on February 14, 2024, 12:25:32 amlike rotating a video
for example, Android 12 completes the task quicker on a slower phone
than a faster phone on Android 14,
Is this video in your application or is this phone generally slower on
Android 14?
Can you try some demos in LAMW and write here which ones are slow? I
could then test the same demos on my phone (S23, also Android 14).
----------------------------------------------------------------------
c4p · 2024-02-14 08:23
Just my app, other apps work fine on my phone and the demos work fine
and rotate quickly for example, it's just my app on Android 14, there
was a marked difference between Android 13 and 14 I noticed it the
minute I upgraded, so I am going to try and rebuild my project from
scratch which will take a while to do but it's the only option I have
left as I suspect there is something amiss on the build with Android
14 as it runs perfect on Android 13 and below.
I'm using the AppCompat theme.
Solution: The Panel component caused the slowness, took all the Panels
out and it resolved the issue, super quick now!
Quote from: dseligo on February 14, 2024, 01:27:58 amQuote from: c4p
on February 14, 2024, 12:25:32 amlike rotating a video for example,
Android 12 completes the task quicker on a slower phone than a faster
phone on Android 14,
Is this video in your application or is this phone generally slower on
Android 14?
Can you try some demos in LAMW and write here which ones are slow? I
could then test the same demos on my phone (S23, also Android 14).