Android Revisited

From bibbleWiki
Revision as of 22:28, 2 March 2025 by Iwiseman (talk | contribs) (Day 1 Here to remind me)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Introduction

Well build an app to send photos to my server and show on Web page. Sound simple but so much has changed.

Day 1 Here to remind me

Android studio installed with copilot. The studio still seems a tad slow compared to VS Code and finding my way around build.gradle.kts is a bit different with the way it manages version numbers.

Found it wanted me to change to SDK 35 but this could not be done without upgrading the android gradle plugin (agp), which is not allowed with my version of studio, 2024.1.1 so had to update the IDE. Sigh. I actually enjoyed how manual all this is. It is the same buzz at likes on twitter.

To Fix missing app in

   import androidx.appcompat.app.AppCompatActivity

I removed the appcompat from the build.gradle.kt

Found you need to add

android.enableJetifier=true

to stop duplicate classes.

Just databinding left to fix. First off enable the feature in build.gradle.kt

   buildFeatures {
       dataBinding = true
   }

Using copilot it appears you have to configure the schemas under Settings->Languages & Frameworks->Schemas anmd DTDs. Don't remember doing this previously. Possibly a security enhancement

http://schemas.android.com/apk/res/android
http://schemas.android.com/apk/res-auto
http://schemas.android.com/tools

And you don't have to do this. Instead you need to add the files to the sourceSet and then it works