
mcpierce
Kotlin and Android Development featuring Jetpack: Unable to run sample code with Android Studio 2022.2.1
I’ve downloaded the sources for the book (dated 2021) after having bought it on Amazon. However, the downloaded sources don’t run in Android Studio. I was able to enter the example code manually from chapter one and run it without issue, but once I hit chapter 2 things just seem to fall apart: the changes called for on page 37 don’t work (found solutions here), but simply adding the dataBindings line to my gradle file causes Android Studio to complain about duplicate classes, and I’m unable to proceed.
Have there been any attempt to update the sample code?
First Post!

mfazio23
Hey Darryl!
As you’ve seen, I’ve called out some updates to the code in the past, but I haven’t checked on the code with more recent versions of Android Studio. While the concepts in the book are still applicable, I’m not surprised that you’re running into setup/config issues as you go along.
Can you share the specific error you’re facing after you add the dataBinding = true
line to your project? That’ll help me figure out what’s going on.
Popular Pragmatic topics








Modern Front-End Development for Rails - application does not start after run bin/setup (page xviii)


Other popular topics









Latest in PragProg
Latest (all)
Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /js
- /rails
- /python
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /haskell
- /emacs
- /svelte
- /onivim
- /typescript
- /crystal
- /c-plus-plus
- /tailwind
- /kotlin
- /gleam
- /react
- /flutter
- /elm
- /ocaml
- /vscode
- /opensuse
- /ash
- /centos
- /php
- /deepseek
- /scala
- /zig
- /html
- /debian
- /nixos
- /lisp
- /agda
- /sublime-text
- /textmate
- /react-native
- /kubuntu
- /arch-linux
- /ubuntu
- /revery
- /manjaro
- /spring
- /django
- /diversity
- /nodejs
- /lua
- /julia
- /slackware
- /c
- /neovim