Recent

Author Topic: LAMW: This app isn't compatible/Slow with Android 14  (Read 3311 times)

c4p

  • Full Member
  • ***
  • Posts: 158
LAMW: This app isn't compatible/Slow with Android 14
« on: January 30, 2024, 08:28:02 am »
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.



 :'(
« Last Edit: January 30, 2024, 07:06:51 pm by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

marcos-ebm

  • New Member
  • *
  • Posts: 49
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #1 on: January 30, 2024, 01:31:26 pm »
[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??
Lazarus 3.0 / LAMW 0.8.6.4 - Gradle 8.5 - Jdk 21 - Ndk 21e - Windows 11

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #2 on: January 30, 2024, 07:28:23 pm »
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:
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
  <uses-permission android:name="android.permission.INTERNET"/>
  <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>

Service:
<service android:name=".jDownloadService"/>

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.
« Last Edit: January 30, 2024, 07:34:39 pm by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2304
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #3 on: January 31, 2024, 02:16:10 am »
What about

change "MinSDK - 23"  to "MinSDK - 24" ?


PS. What about your LAMW setup? (JDK version, gradle version,  Android SDK version...)
« Last Edit: January 31, 2024, 02:18:31 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #4 on: January 31, 2024, 09:54:56 am »
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.
« Last Edit: January 31, 2024, 09:58:23 am by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2304
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #5 on: January 31, 2024, 05:54:22 pm »

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...
 
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #6 on: February 01, 2024, 10:21:18 am »
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.
« Last Edit: February 01, 2024, 01:55:29 pm by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2304
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #7 on: February 01, 2024, 05:39:51 pm »

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.
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #8 on: February 02, 2024, 12:36:53 pm »
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")
}
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #9 on: February 05, 2024, 09:36:04 pm »
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.

 :(
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2304
« Last Edit: February 06, 2024, 04:24:15 am by jmpessoa »
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #11 on: February 06, 2024, 09:31:04 pm »
Added 'arm64-v8a' below to build.gradle:

Code: Pascal  [Select][+][-]
  1. 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.

Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2304
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #12 on: February 06, 2024, 10:32:19 pm »
Quote
Added 'arm64-v8a' below to build.gradle....

There is some libcontrols.so in project folder /lib/arm64-v8a? 

Quote
just doesn't run with arm64 apk, on my device anyway.

What is your device chip? 
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #13 on: February 06, 2024, 10:35:14 pm »
Quote
There 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.
« Last Edit: February 06, 2024, 10:43:33 pm by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

jmpessoa

  • Hero Member
  • *****
  • Posts: 2304
Re: LAMW: This app isn't compatible/Slow with Android 14
« Reply #14 on: February 06, 2024, 10:56:31 pm »
Quote
No folder is empty, and on a fresh project.

Well, you can select "arm64-v8a"  on building  a fresh project..... and test it!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018