Questions tagged [androidx]

New Android extension libraries (AndroidX) which represents an Android Support Library.

New package structure to make package structure clearer which packages are bundled with the Android operating system, and which are packaged with Android app's APK. Going forward, the android.* package hierarchy will be reserved for Android packages that ship with the operating system; other packages will be issued in the new androidx.* package hierarchy.

Existing packages are being refactored to use the new hierarchy. Historical artifacts—those versioned 27 and earlier, and packaged as android.support.* —will remain available on Google Maven; however, all new development will occur in the new androidx.*-packaged artifacts versioned starting from 1.0.0.

Release blog

Official Google Doc

AndroidX release notes

AndroidX refactoring

2486 questions
10
votes
5 answers

This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled

This is my Error; This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled. Set this property to true in the gradle.properties file and retry. The following AndroidX dependencies are detected:…
commandiron
  • 1,019
  • 1
  • 9
  • 25
10
votes
1 answer

pop up to graph startDestination fragment for a global action - Android navigation components

I've a multi-graph navigation app and I'd like to switch between graphs by using a global action as defined in my root main_graph.xml
10
votes
6 answers

Manifest merger failed : Attribute application@appComponentFactory updating Firebase libraries

I am trying to add firebase in my project but when I implement 'com.google.firebase:firebase-messaging:19.0.0' and 'com.google.firebase:firebase-core:17.0.0'. build.gradle(here is the error) apply plugin: 'com.android.application' apply plugin:…
Jordan Kotiadis
  • 558
  • 6
  • 21
10
votes
2 answers

Androidx scrolling view behavior not working

After switching to androidx the following code stopped working. The TextView below the Toolbar used to scroll with the content, but now it doesn't. I managed to make it work only when I set the same scrollFlags to Toolbar, but I would like to keep…
10
votes
3 answers

Converting existing android support to androidX

I am working on an existing project. I want to convert my android project(oreo) from the support library to androidX library. I have tried many tricks and tips but no progress at all. What is the easiest approach to do that?
Zeeshan Ahmad
  • 137
  • 1
  • 1
  • 5
10
votes
6 answers

Transparent AppBarLayout

I'm developing an application where I'd like to have a transparent Toolbar (AppBarLayout), but still see the navigation icon button. Unfortunately, best I can achieve is transparent toolbar that still drops the shadow (elevation). I have a full…
Jakub Gruber
  • 745
  • 1
  • 11
  • 27
10
votes
3 answers

ANDROID: Error inflating class android.support.design.widget.AppBarLayout

I added a toolbar to my layout and now I get this error when running: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.myapp/mainactivity.MainActivity}: android.view.InflateException: Binary XML file line #9: Binary XML…
CJR
  • 3,174
  • 6
  • 34
  • 78
10
votes
1 answer

Fragment disappears with ViewPager2 and FragmentStateAdapter

I'm building an app using ViewPager2 that displays different fragments when swiped. My adapter extends FragmentStateAdapter as described here. When I put my app into the background and then resume again, the current fragment disappears. What do I…
rstockbridge
  • 233
  • 3
  • 11
10
votes
2 answers

error: cannot find symbol import com.gourav.news.databinding.ActivityDetailBindingImpl;

I tried Buiding the app but keep getting /Users/gouravkarwasara/Desktop/News2/app/build/generated/source/kapt/debug/com/gourav/news/DataBinderMapperImpl.java:9: error: cannot find symbol import com.gourav.news.databinding.ActivityDetailBindingImpl; …
10
votes
8 answers

Error inflating class after migration to androidx

I made a migration to Androidx but after the migration, I'm getting the following error: Caused by: android.view.InflateException: Binary XML file line #12: Binary XML file line #2: Error inflating class…
hassan abbasi
  • 123
  • 1
  • 1
  • 9
10
votes
2 answers

Android Studio does not recognise androidx preference library in xml

I am trying to use the new androidx preference library but Android Studio simply does not recognize it in the xml. In my res/xml/setting_prefs.xml, I have
Yashovardhan99
  • 887
  • 11
  • 26
10
votes
3 answers

AndroidX migrate dependency / libraries

I have successfully migrated my project to AndroidX. App is running perfectly, but I am getting compile time errors, because my dependencies use support package. Reason of this error Because PhotoView is a dependency class, which uses…
Khemraj Sharma
  • 57,232
  • 27
  • 203
  • 212
10
votes
2 answers

Difference between android.* vs androidx.* package implementation and usage in android

Google launch an early preview of the new Android extension libraries (AndroidX) which is basically new replacement of existing android support library and architecture packages as per their documentation. But what is the actual difference between…
0xAliHn
  • 18,390
  • 23
  • 91
  • 111
10
votes
1 answer

How to use androidx.recyclerview.widget.RecyclerView with tools:listitem?

How to use androidx.recyclerview.widget.RecyclerView with tools:listitem? I have this layout:
9
votes
3 answers

Deeplinking to another module with parameters

I'm trying to navigate using a deep-link for cross-module user navigation, and I need to pass some parameters. Since it's in another module, I don't have access to the id, so all of the navigate(@IdRes int resId, ...) methods are off the…
Tyler
  • 19,113
  • 19
  • 94
  • 151