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
33
votes
2 answers

Migrating to AndroidX - android.support.FILE_PROVIDER_PATHS location

I am in the middle of migrating a project to AndroidX and I am blocked with an issue.
sunlover3
  • 1,999
  • 1
  • 20
  • 25
32
votes
6 answers

How to use EditText or TextInput widget in Jetpack compose?

I was exploring Jetpack compose by trying a few widgets like Image and EditText. For text input, it has EditableText. I have tried below code but it is not showing anything in UI class MainActivity : AppCompatActivity() { override fun…
32
votes
9 answers

Flutter Projects & Android X Migration Issues

I just created a new flutter project, added a few plugins and I'm getting the plugin switched to android x therefore i need to switch to android x. I've tried all the different ways of moving to android x and none has worked for me so far. Right now…
marvin ralph
  • 1,100
  • 3
  • 23
  • 43
31
votes
6 answers

IllegalStateException: WorkManager is already initialized

Having these dependencies: dependencies { implementation "androidx.work:work-runtime:2.0.1" androidTestImplementation "androidx.work:work-testing:2.0.1" } When running this code for the second time: Configuration config = new…
30
votes
2 answers

Unresolved reference ActivityTestRule for AndroidX

I'm trying to test my UI via instrumentation test, with androidX espresso library. In my grade I have: apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin:…
Nicola Gallazzi
  • 7,897
  • 6
  • 45
  • 64
30
votes
3 answers

Difference between DialogPreference before and after AndroidX

We are currently migrating to Androidx namespace with our Android app project. However I noticed that not only the namespace seems to have changed. For DialogPreference also some interfaces which were using before are now missing new interfaces:…
little_planet
  • 655
  • 1
  • 6
  • 13
29
votes
4 answers

WorkManager - Should we remove the default initializer, when we use both Default initialization and Custom initialization?

I'm getting the following new error, when I upgrade WorkManager from "2.2.0" to "2.3.0-rc01" The error occurs when I'm exporting APK. C:\app: Error: Remove androidx.work.impl.WorkManagerInitializer from your AndroidManifest.xml when using on-demand…
Cheok Yan Cheng
  • 47,586
  • 132
  • 466
  • 875
29
votes
5 answers

Navigation components : Deeplink using uri depending buildType

Any way to read a constant depending buildType ${deepLinkHost}? debug -> deepLinkUri = http://link.debug/ staging -> deepLinkUri = http://link.staging/ release -> deepLinkUri= http://link/
rafaelasguerra
  • 2,685
  • 5
  • 24
  • 56
29
votes
3 answers

Issues using AndroidX and React Native

I've been trying to integrate AndroidX into my hybrid React Native project, and I've run into the issue that Jetifier doesn't run on "local" projects. This results in all of my React Native libraries still using the old support libraries. I've put…
Chubacca
  • 435
  • 1
  • 5
  • 9
29
votes
11 answers

SupportMapFragment does not support AndroidX Fragment

import com.google.android.gms.maps.SupportMapFragment; import androidx.fragment.Fragment; ... private SupportMapFragment mMapFragment; ... mMapFragment = (SupportMapFragment)…
28
votes
6 answers

Getting library "libjsc.so" not found after upgrading React Native to 0.60-RC2

I have updated React Native to 0.60-RC2, migrated to AndroidX using the Android Studio refractor and used the jetifier mentioned here: https://github.com/react-native-community/discussions-and-proposals/issues/129 After doing this, I get the error…
khateeb
  • 5,265
  • 15
  • 58
  • 114
27
votes
4 answers

Change ViewPager2 Scroll Speed when sliding programmatically

I know there is way to change animation duration of ViewPager programmatical slide (here). But its not working on ViewPager2 I tried this: try { final Field scrollerField = ViewPager2.class.getDeclaredField("mScroller"); …
Saeed Arianmanesh
  • 1,269
  • 2
  • 22
  • 33
27
votes
3 answers

What do I need to import to use launchActivity<>() in UnitTests?

So I'm trying to test my activity following googles instructions here: https://developer.android.com/guide/components/activities/testing But the code launchActivity() does not work. Do I need to define launchActivity as a rule or is…
Dan Anderson
  • 1,062
  • 13
  • 26
27
votes
2 answers

Why attribute app:endIconMode is not found in TextInputLayout?

Hello I am creating an app with the androidx libraries but when I am trying to add a toggle to show or hide the password in an TextInputEditText with the app:endIconMode attribute I am getting the error error: attribute endIconMode not found. This…
acabezas
  • 731
  • 1
  • 7
  • 20
27
votes
5 answers

Snackbar package in AndroidX

When migrating a project or switching between branches which are and aren't migrated, Android Studio cannot build projects because it cannot find the android.support.design.widget.Snackbar package. Support/Design packages are removed but the…
Nick Cardoso
  • 20,807
  • 14
  • 73
  • 124