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
1
vote
1 answer

Kotlin cannot create an instance of ViewModel

I've been getting the following error against my ViewModel: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.cryptpass_kt/com.example.cryptpass_kt.MainActivity}: java.lang.RuntimeException: Cannot create an instance of…
1
vote
2 answers

AndroidX Error: Both old and new data binding packages are available in dependencies.I am upgrading a flutter project to AndroidX

I am getting the error after AndoirdX upgrade. android.databinding.tool.util.LoggedErrorException: failure, see logs for details. AndroidX Error: Both old and new data binding packages are available in dependencies Make sure you've setup jettifier…
Gauranga
  • 931
  • 1
  • 9
  • 17
1
vote
0 answers

Issue with recyclerview dependency after migrating to androidx

I'm completely rebuilding an old project, and have only kept the xml files (which show no error). I chose to update to androidx, and have synced all dependencies correctly, except for recyclerview. Whenever I try to sync, it would show the error log…
1
vote
1 answer

Unresolved reference: setLifecycleOwner in AndroidX

MainActivity.kt: (41, 16): Unresolved reference: setLifecycleOwner Task :app:buildInfoGeneratorDebug My app uses AndroidX, in my gradle.properties: android.useAndroidX=true android.enableJetifier=true My Code in onCreate function in…
Suisse
  • 3,467
  • 5
  • 36
  • 59
1
vote
2 answers

Flutter compiler error when installing location 2.3.5 package

I installed the: flutter package - location 2.3.5 https://pub.dev/packages/location And when I try to run the application I get a compilation error: * What went wrong: Execution failed for task ':location:compileDebugJavaWithJavac'. > Compilation…
Dushy
  • 375
  • 3
  • 13
1
vote
0 answers

How to set up a tablayout with viewpager in a bottom navigation view fragment?

I have a bottom Navigation view navigation view that contains 5 fragments, in one of those fragments I need to have a card slider (basically a view pager with a tab layout that slides between two cards back and forth) I have tried a lot of solutions…
Thorvald
  • 3,424
  • 6
  • 40
  • 66
1
vote
0 answers

Failed to resolve variable when migrating to AndroidX

I tried migrating to AndroidX but I get these errors when building Gradle. And it's odd since I do not always get the errors and I do not know where the errors are from, so I can't really which solution from SO answers solve the issue. I found that…
waseefakhtar
  • 1,373
  • 2
  • 24
  • 47
1
vote
3 answers

ClassCastException ContentFrameLayout androidx vs. support.v7 in system app

Strange Exception I am getting on a system app when I am using just FrameLayout in my SampleActivity. Caused by: java.lang.ClassCastException: androidx.appcompat.widget.ContentFrameLayout cannot be cast to…
TheLittleNaruto
  • 8,325
  • 4
  • 54
  • 73
1
vote
1 answer

ItemTouchHelper scroll doesn't work in recyclerView that is nested in a horizontal Scroll view

I have a horizontal recyclerView in a LinearLayout in a fragment of its own. The placeholder for the fragment is wrapped in a horizontalScrollView. When i add in the fragment the recyclerview nestedScroll is set to false and the HorizontalScrollView…
nt95
  • 455
  • 1
  • 6
  • 21
1
vote
1 answer

ViewModelProvider.Factory remains null on fragment using Dagger and Java on Android

Using the google sample GithubsampleBrowser I have become stuck on trying to inject the ViewModelProvider.Factory. When comparing with the sample, I see it goes GithubViewModelFactory fine but mine never does and i'm not sure what I am missing.…
Shade
  • 45
  • 2
  • 13
1
vote
2 answers

How to bind Preview and texture in CameraX

I recently tried to develop a flutter plugin with cameraX, but I found that there was no way to simply bind Preview to flutter's Texture. In the past, I only needed use camera.setPreviewTexture(surfaceTexture.surfaceTexture()) to bind camera and…
CaiJingLong
  • 129
  • 3
  • 9
1
vote
0 answers

Material FloatingActionButton inside CoordinatorLayout is not showing in the design preview window

I am using material FloatingActionButton inside CoordinatorLayout with androidx libraries, but my design window is not showing anything. Here is the code that I have tried:
Md. Yamin Mollah
  • 1,609
  • 13
  • 26
1
vote
2 answers

AndroidX supports 5.0 or lower?

I was developed with AndroidX and it is a wonderful library, I run my demo app in my smartphone with Android 6, but I have a question, does AndroidX support Android 5.0 and lower?
1
vote
0 answers

How to fix IllegalAccessError related to Rejecting re-init on previously-failed class androidx.core.view.ViewCompat

Im developing an android app and when i start the main activity in a device or emulator, appears this error in logcat. How can i fix this? PD: Recently, i read the following link and it seems that, apart of being related, is not resolved in a short…
Marlon López
  • 460
  • 8
  • 21
1
vote
0 answers

Class Dependency Is Duplicated "Program type already present"

Error Program type already present: androidx.versionedparcelable.NonParcelField","sources":[{}],"tool":"D8"} I Couldn't figure out which entry is duplicated anyone help me to resolve this ? does it cause of Androidx core library ? but i think…
Ajay Pandya
  • 2,417
  • 4
  • 29
  • 65
1 2 3
99
100