https://kotlinlang.org logo
Channels
100daysofcode
100daysofkotlin
100daysofkotlin-2021
advent-of-code
aem
ai
alexa
algeria
algolialibraries
amsterdam
android
android-architecture
android-databinding
android-studio
androidgithubprojects
androidthings
androidx
androidx-xprocessing
anime
anko
announcements
apollo-kotlin
appintro
arabic
argentina
arkenv
arksemdevteam
armenia
arrow
arrow-contributors
arrow-meta
ass
atlanta
atm17
atrium
austin
australia
austria
awesome-kotlin
ballast
bangladesh
barcelona
bayarea
bazel
beepiz-libraries
belgium
benchmarks
berlin
big-data
books
boston
brazil
brikk
budapest
build
build-tools
bulgaria
bydgoszcz
cambodia
canada
carrat
carrat-dev
carrat-feed
chicago
chile
china
chucker
cincinnati-user-group
cli
clikt
cloudfoundry
cn
cobalt
code-coverage
codeforces
codemash-precompiler
codereview
codingame
codingconventions
coimbatore
collaborations
colombia
colorado
communities
competitive-programming
competitivecoding
compiler
compose
compose-android
compose-desktop
compose-hiring
compose-ios
compose-mp
compose-ui-showcase
compose-wear
compose-web
confetti
connect-audit-events
corda
cork
coroutines
couchbase
coursera
croatia
cryptography
cscenter-course-2016
cucumber-bdd
cyprus
czech
dagger
data2viz
databinding
datascience
dckotlin
debugging
decompose
decouple
denmark
deprecated
detekt
detekt-hint
dev-core
dfw
docs-revamped
dokka
domain-driven-design
doodle
dsl
dublin
dutch
eap
eclipse
ecuador
edinburgh
education
effective-kotlin
effectivekotlin
emacs
embedded-kotlin
estatik
event21-community-content
events
exposed
failgood
fb-internal-demo
feed
firebase
flow
fluid-libraries
forkhandles
forum
fosdem
fp-in-kotlin
framework-elide
freenode
french
fritz2
fuchsia
functional
funktionale
gamedev
ge-kotlin
general-advice
georgia
geospatial
german-lang
getting-started
github-workflows-kt
glance
godot-kotlin
google-io
gradle
graphic
graphkool
graphql
graphql-kotlin
graviton-browser
greece
grpc
gsoc
gui
hackathons
hacktoberfest
hamburg
hamkrest
helios
helsinki
hexagon
hibernate
hikari-cp
hire-me
hiring
hongkong
hoplite
http4k
hungary
hyderabad
image-processing
india
indonesia
inkremental
intellij
intellij-plugins
intellij-tricks
internships
introduce-yourself
io
ios
iran
israel
istanbulcoders
italian
jackson-kotlin
jadx
japanese
jasync-sql
java-to-kotlin-refactoring
javadevelopers
javafx
javalin
javascript
jdbi
jhipster-kotlin
jobsworldwide
jpa
jshdq
juul-libraries
jvm-ir-backend-feedback
jxadapter
k2-early-adopters
kaal
kafka
kakao
kalasim
kapt
karachi
karg
karlsruhe
kash_shell
kaskade
kbuild
kdbc
kgen-doc-tools
kgraphql
kinta
klaxon
klock
kloudformation
kmdc
kmm-español
kmongo
knbt
knote
koalaql
koans
kobalt
kobweb
kodein
kodex
kohesive
koin
koin-dev
komapper
kondor-json
kong
kontent
kontributors
korau
korean
korge
korim
korio
korlibs
korte
kotest
kotest-contributors
kotless
kotlick
kotlin-asia
kotlin-beam
kotlin-by-example
kotlin-csv
kotlin-data-storage
kotlin-foundation
kotlin-fuel
kotlin-in-action
kotlin-inject
kotlin-latam
kotlin-logging
kotlin-multiplatform-contest
kotlin-mumbai
kotlin-native
kotlin-pakistan
kotlin-plugin
kotlin-pune
kotlin-roadmap
kotlin-samples
kotlin-sap
kotlin-serbia
kotlin-spark
kotlin-szeged
kotlin-website
kotlinacademy
kotlinbot
kotlinconf
kotlindl
kotlinforbeginners
kotlingforbeginners
kotlinlondon
kotlinmad
kotlinprogrammers
kotlinsu
kotlintest
kotlintest-devs
kotlintlv
kotlinultimatechallenge
kotlinx-datetime
kotlinx-files
kotlinx-html
kotrix
kotson
kovenant
kprompt
kraph
krawler
kroto-plus
ksp
ktcc
ktfmt
ktlint
ktor
ktp
kubed
kug-leads
kug-torino
kvision
kweb
lambdaworld_cadiz
lanark
language-evolution
language-proposals
latvia
leakcanary
leedskotlinusergroup
lets-have-fun
libgdx
libkgd
library-development
lincheck
linkeddata
lithuania
london
losangeles
lottie
love
lychee
macedonia
machinelearningbawas
madrid
malaysia
mathematics
meetkotlin
memes
meta
metro-detroit
mexico
miami
micronaut
minnesota
minutest
mirror
mockk
moko
moldova
monsterpuzzle
montreal
moonbean
morocco
motionlayout
mpapt
mu
multiplatform
mumbai
munich
mvikotlin
mvrx
myndocs-oauth2-server
naming
navigation-architecture-component
nepal
new-mexico
new-zealand
newname
nigeria
nodejs
norway
npm-publish
nyc
oceania
ohio-kotlin-users
oldenburg
oolong
opensource
orbit-mvi
osgi
otpisani
package-search
pakistan
panamá
pattern-matching
pbandk
pdx
peru
philippines
phoenix
pinoy
pocketgitclient
polish
popkorn
portugal
practical-functional-programming
proguard
prozis-android-backup
pyhsikal
python
python-contributors
quasar
random
re
react
reaktive
realm
realworldkotlin
reductor
reduks
redux
redux-kotlin
refactoring-to-kotlin
reflect
refreshversions
reports
result
rethink
revolver
rhein-main
rocksdb
romania
room
rpi-pico
rsocket
russian
russian_feed
russian-kotlinasfirst
rx
rxjava
san-diego
science
scotland
scrcast
scrimage
script
scripting
seattle
serialization
server
sg-user-group
singapore
skia-wasm-interop-temp
skrape-it
slovak
snake
sofl-user-group
southafrica
spacemacs
spain
spanish
speaking
spek
spin
splitties
spotify-mobius
spring
spring-security
squarelibraries
stackoverflow
stacks
stayhungrystayfoolish
stdlib
stlouis
strife-discord-lib
strikt
students
stuttgart
sudan
swagger-gradle-codegen
swarm
sweden
swing
swiss-user-group
switzerland
talking-kotlin
tallinn
tampa
teamcity
tegal
tempe
tensorflow
terminal
test
testing
testtestest
texas
tgbotapi
thailand
tornadofx
touchlab-tools
training
tricity-kotlin-user-group
trójmiasto
truth
tunisia
turkey
turkiye
twitter-feed
uae
udacityindia
uk
ukrainian
uniflow
unkonf
uruguay
utah
uuid
vancouver
vankotlin
vertx
videos
vienna
vietnam
vim
vkug
vuejs
web-mpp
webassembly
webrtc
wimix_sentry
wwdc
zircon
Powered by
Title
k

kartikpatodi

06/10/2018, 8:47 PM
when I try to use databinding it generates
android.support.constraint.ConstraintLayout
instead of
androidx
equivalent
r

rkeazor

06/10/2018, 10:26 PM
if your using databinding, why would you be using android-kotlin-extenstions
thats what its suppose to do
k

kartikpatodi

06/10/2018, 10:30 PM
It is a java + kotlin project
r

rkeazor

06/10/2018, 10:33 PM
yea but what is the point in using both?
i mean databinding , and the extentsions
k

kartikpatodi

06/10/2018, 10:35 PM
Well even though i remove extentions then also it should genetate classes with imports according to androidx namespace
For constraint layout
r

rkeazor

06/10/2018, 10:42 PM
gotcha, although, im not sure what you mean.. If your using kotlin extentsions , than it goes by ID. its not possible for you to just type an id and than it auto import an a view group
unless your id is ConstraintLayout
lol
although I wonder, if Databinding gives you the same capability🤔. can’t remember
k

kartikpatodi

06/10/2018, 10:44 PM
@rkeazor using databinging fir generating java class only... With daggr
r

rkeazor

06/10/2018, 10:44 PM
🤔
i have no idea what your talking about😂 what does dagger have to do with databinding.
k

kartikpatodi

06/10/2018, 10:47 PM
No prob let it be
r

rkeazor

06/10/2018, 10:50 PM
hehe just playing dude. if you post some sample code maybe it will give more context..
k

kartikpatodi

06/10/2018, 11:06 PM
i have no idea what your talking about😂 what does dagger have to do with databinding.
Sorry it is not.... mixed issues of two different projects maybe should take the day off
g

gildor

06/10/2018, 11:37 PM
Android Extensions is not replacement for Databinding library. Binding library can do much-much more than just search for views by id.
k

kartikpatodi

06/10/2018, 11:38 PM
@gildor can you explain the behavior in the main issue
g

gildor

06/10/2018, 11:39 PM
Actually really interesting issue. Do you use androidx.constraintlayout, but binding generates android.support? Do you use jettifier? Are you sure that it's not a problem of some of your binding adapters? I just don't think that binding library knows anything about Constraint Layout, maybe some bug of jettifier with code generation
If you have reproduction steps, please let me know, I would like to vote up this issue
I would like, but our app with bindings is not use androidx yet, but another app already on androidx without issues, but no bindings there
k

kartikpatodi

06/10/2018, 11:43 PM
actually i am not familiar with the data binding library I am trying to implement this codelab https://github.com/googlecodelabs/android-build-an-app-architecture-components
I bumped up the dependencies all the way to support AS 3.2-alpha17
and refactored to androidX
please try and let me know @gildor
also it is java and trying to convert to kotlin ass well 🙂
r

rkeazor

06/10/2018, 11:49 PM
Ohhh
wait a sec
are you trying to use extensions in Java?
k

kartikpatodi

06/10/2018, 11:50 PM
which extensions?
r

rkeazor

06/10/2018, 11:50 PM
androidx
k

kartikpatodi

06/10/2018, 11:51 PM
yes
r

rkeazor

06/10/2018, 11:51 PM
thats not possible , i believe
k

kartikpatodi

06/10/2018, 11:51 PM
but androidx and ktx are two different things I guess you are mixing these two
androidx can be used with both but ktx cannot
r

rkeazor

06/10/2018, 11:53 PM
‘kotlin-android-extensions’
k

kartikpatodi

06/10/2018, 11:53 PM
and thats also a different thing
r

rkeazor

06/10/2018, 11:53 PM
what
lol
r

rkeazor

06/10/2018, 11:56 PM
my bad i see , your saying that when your trying to import the constraint layout , it doesn’t show
as within the new package structure
k

kartikpatodi

06/10/2018, 11:57 PM
yes and btw android kotlin extention is
kotlinx
and not
androidx
r

rkeazor

06/11/2018, 12:08 AM
are you able to type the import in manurally
k

kartikpatodi

06/11/2018, 12:09 AM
yes but is says don't change the generated classes
r

rkeazor

06/11/2018, 12:40 AM
Did you do Refactor -> Refactor android x , in Android studio?
k

kartikpatodi

06/11/2018, 12:40 AM
Yes
r

rkeazor

06/11/2018, 12:42 AM
do you see, the constraint layout dependency when you do that?
it should give you the option to migrate.. If your still having a issue after that . than do file a bug report. its still fairly new
k

kartikpatodi

06/11/2018, 12:43 AM
It chanded the dependencies throughout the project but not in the generated classes
r

rkeazor

06/11/2018, 12:44 AM
just do a clean -> rebuild
k

kartikpatodi

06/11/2018, 12:44 AM
Did that
r

rkeazor

06/11/2018, 12:46 AM
generated classes from Databinding?
yea just file a report. of what your going thru
k

kartikpatodi

06/11/2018, 12:48 AM
Right
r

rkeazor

06/11/2018, 12:57 AM
also , make sure the support dependency isn’t in your build.gradle
g

gildor

06/11/2018, 1:09 AM
@kartikpatodi do you have own fork, refactored to androidx that I could try and reproduce your problem?
k

kartikpatodi

06/11/2018, 1:23 AM
wait
g

gildor

06/11/2018, 2:42 AM
@kartikpatodi No issue with androidx and constraint layouts. Just fix package name in layout xml
k

kartikpatodi

06/11/2018, 2:43 AM
Can you pr the changes if you have a working version
g

gildor

06/11/2018, 2:43 AM
This is PR with fix
k

kartikpatodi

06/11/2018, 2:45 AM
Thanks for your time
g

gildor

06/11/2018, 2:45 AM
See, DataBinding generate code from your layout file, so just uses packages from layout
also, androidx.constraintlayout 1.1.1 changed package name from
androidx.constraintlayout.widget
to
androidx.constraintlayout
k

kartikpatodi

06/11/2018, 2:47 AM
Oh I see thanks