tvbrowserandroid icon indicating copy to clipboard operation
tvbrowserandroid copied to clipboard

General Update

Open ThorstenGiesecke opened this issue 7 months ago • 2 comments

Updated necessary dependencies (libraries, AGP, Gradle) and build and property files to the latest version, due the lack of updates since some years. Prepares support for modern Android platforms > 28

The new dependencies require to install the latest Android Studio build, i.e. side-by-side via JetBrains Toolbox (suggested), via a package manager (apt, brew, winget, etc.), or manually.

For the version dependencies mentioned below Android Studio Narwhal Feature Drop 2025.1.2 Nightly is highly recommended. Also, the JVM used inside Android Studio and Gradle scripts should be aligned (use AGP migration helper or project settings), i.e. by using the bundled JVM of IntelliJ.

Some errors must be fixed on first project import using Android Studio Narwhal Feature Drop. DO NOT USE OLD ANDROID STUDIO BUILDS due incompatibilities and end of life policy (critical CVS's may not be fixed).

A side-by-side installation and a optional branch - during migration and testing - can help.

Selected Changes:

  • Updated AGP to from 3.4.2 to 8.10.0
  • Updated Gradle from 5.2.1-all to 8.14-all
  • Updated minSdk from 14 to 16 (required)
  • Updated build.gradle and different sections: plugins instead apply, namespace instead package name, lint instead of lintOptions, equal sign to assign properties
  • Updated buildFeatures and sourceSets (required for new buildConfig and to support aidl in the future; otherwise .aidl files are ignored)
  • Updated old alpha and beta dependencies in build.gradle to their release variants
  • Updated outdated android.arch.work:work-runtime:1.0.1 with androidx.work:work-runtime:2.0.1
  • Enabled multiDex and desugaring (backports modern Java 7+ core functions and selected API's to old devices during build time) in build.gradle and App class
  • Removed deprecated mavenCentral(); added gradlePluginPortal()
  • Replaced switch blocks with non-constant resource values with if-else if-else (enforced with newer build tools)
  • Replaced 3 private color resources due Theme change (now in colors.xml)
  • Fixed minus with dash in strings.xml
  • Added required export attribute to selected activity definitions in AndroidManifest.xml
  • Added default CookieHandler (not set on all old systems) to App class
  • Replaced TargetApi annotations with newer RequiresApi annotation; added DiscouragedPrivateApi in CompatUtils
  • Minor Cleancode: unused imports, dead code

Environment Android Studio Narwhal Feature Drop 2025.1.2 Nightly Build #AI-251.25410.109.2512.13515449, built on May 19, 2025 Runtime version: 21.0.6+-13391695-b895.109 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. (built-in) OS: Windows 11 64-bit (de) / Build 24H2

ThorstenGiesecke avatar May 23 '25 12:05 ThorstenGiesecke