Questions tagged [androidx]
New Android extension libraries (AndroidX) which represents an Android Support Library.
2,391
questions
0
votes
1
answer
28
views
How to pass request code in ActivityResultLauncher
I am updating some Xamarin.Android code to use the newer AndroidX APIs. The old way to launch an activity in my project was like this:
var intent = new Intent(this.Activity, typeof(SomeActivity));
...
1
vote
0
answers
32
views
Duplicate classes androidx.appcompat: Android studio
I'm getting the following error message on running my program, with Android Studio, kotlin version 1.7.10, jetpack compose:
Duplicate class androidx.appcompat.content.res.AppCompatResources found in ...
0
votes
0
answers
24
views
Change size of only one icon of bottom navigation view (Android)
I want to change the size of only ONE icon (3rd icon) out of the 5 icons I have used in my bottom navigation view.
This is what I have tried:
private fun setReportPainIconSize(){
val ...
0
votes
0
answers
25
views
Cannot inherit from final 'com.example.mycountryapp.databinding.FragmentFeedBinding' and 'FragmentFeedBinding()' has private access in
Feed Fragment
class FeedFragment : Fragment() {
private lateinit var viewModel : FeedViewModel
private val countryAdapter = CountryAdapter(arrayListOf())
override fun onCreate(savedInstanceState: ...
0
votes
0
answers
18
views
Hide a Preference-item depending on the state (enabled/disabled) of another Preference in PreferenceScreen
I'm creating a settings screen, and I have a few settings items:
SwitchPreferenceCompat and my CustomPreference.
I need the СustomPreference to disappear(hide) when the SwitchPreferenceCompat is ...
0
votes
0
answers
24
views
Unity crash on Android on startup: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/startup/R$string
We have a plugin for Unity to be used by games on Android. The plugin is built on macOS with gradle 7.1.1, multidex enabled, fat-aar, and grease 0.3.0
Building with Unity 2021.3.3f1 on macOS Monterey,...
0
votes
0
answers
10
views
Can lack of support for "should override with redirects" affect URL loading in WebViewClient or only in WebViewClientCompat?
I am looking at migrating my code from WebView to WebViewCompat in order to simplify my code which currently has a lot of "if API > X do this else do that" type code.
I currently use ...
2
votes
1
answer
32
views
How to grant permanent permission on Uri images (androidx)
In my application a user can open the gallery and select their images by using androidX method:
registeredIntent = registerForActivityResult(new ActivityResultContracts.GetMultipleContents(), this);
...
-1
votes
0
answers
16
views
i am in the middle of building android app and my app keep crashing in android emulator but builds without error
MainActivity - this is where i set BottomNavigation using the file in the menu resource and instancetiated two fragments and add NavigationItemListener
package com.example.adeypay;
import androidx....
0
votes
0
answers
22
views
Use AndroidX Library without enabling AndroidX to true
I have a huge codebase which indeed will take a lot of time to shift to AndroidX support, now there is a library that I hugely depend on with which I need to integrate inside my android app.
I have ...
-1
votes
1
answer
48
views
Why does App crashes when enableing obfuscate?
What happens
App crashes when I set
minifyEnabled true
shrinkResources true
Stacktrace [IMPORTANT]
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/app/Application$...
0
votes
0
answers
16
views
How can use ActivityResultLauncher without import androidx
right I'm trying to import to my project:
import androidx.activity.result.ActivityResultLauncher;
and I tried to implement:
private ActivityResultLauncher<Intent> intentActivityResultLauncher;
...
0
votes
0
answers
31
views
How to convert Bitmap to ImageProxy in android?
It seems that androidx.camera.core.ImageProxy is an abstract class, but I can't find any public class that can easily build an instance with Bitmap or Image.
Is there any?
0
votes
0
answers
17
views
There is gap on the top of bottom navigation view androidx
So i'm developing android app using kotlin, when i build bottom navigation bar, there is something like glitch as you can see on images below. Anyone knows why there is gap on top of bottom navigation ...
0
votes
0
answers
17
views
Is posible custom player control view timeout animation via override androidx.media3.ui#PlayerControlView (Exoplayer StyledPlayerControlView)?
I want make some custom hide/show player controller animations.
And saw ExoPlayer issue #2277 and #3098 there.
It say that override hide() and show() to do animate stuff.
So I tried overide androidx....
0
votes
1
answer
43
views
ComposeUI: More convenient way to create this layout with lines connecting several composables
What do I want to achieve?
I want to create the following layout. It is important that the vertical "connecting" lines go inside the numbered boxes:
What did I already try (first, naive ...
0
votes
0
answers
21
views
How to host widgets in an Android launcher app (stuck on "Loading...")
Every example I've seen of this uses a picker and startActivityForResult() which is deprecated. I've attempted to host the analog clock, but it's stuck on "Loading widget..." What am I ...
0
votes
0
answers
27
views
OnBackPressedCallback is no longer working after setting AppCompatDelegate.setDefaultNightMode
We are updating the app theming using
AppCompatDelegate.setDefaultNightMode(
when (item.isChecked) {
true -> AppCompatDelegate.MODE_NIGHT_YES
else -> ...
3
votes
0
answers
149
views
java.lang.NoSuchMethodError in AndroidX in obfuscated app
I've got a really weird error and I need an expert's eye to dig more into this issue.
In releasing my application in play store, I got some crashes in Crashlytics that seems to happen only on a few ...
0
votes
1
answer
32
views
No changes after using Migrate to AndroidX option
I am trying to Migrate our app to AndroidX.
"Migrate to AndroidX" option is not migrating the support packages to AndroidX.
No changes found in packages.config.
Can anyone help me on this or ...
1
vote
1
answer
301
views
NoClassDefFoundError: Could not initialize class androidx.customview.poolingcontainer.PoolingContainer
With Jetpack Compose UI Tooling 1.2.0-rc01 and Compose Compiler 1.2.0;
android {
composeOptions {
kotlinCompilerExtensionVersion "1.2.0"
}
}
dependencies {
...
0
votes
0
answers
58
views
How to I import androidx's "ApplicationLifecycleDispatcher"?
I am removing expo modules from my android project and switching over to androidx. However, I cannot seem to find the "ApplicationLifecycleDispatcher" in either expo modules' documentation ...
0
votes
0
answers
78
views
Camera x imageCapture.takePicture function is not working on android 12
Here i'm trying to take pictures using camerax , it is working with below android 12 devices perfectly but when use android 12 device it is not working.
long x = System.currentTimeMillis();
...
1
vote
0
answers
94
views
What is "androidx.lifecycle.BundlableSavedStateRegistry.key" in this bundle?
I'm using toolargetool to investigate why the app is crashing from TransactionTooLargeException.
I'm seeing there's this key androidx.lifecycle.BundlableSavedStateRegistry.key which can be around 400 ...
0
votes
0
answers
168
views
onBackPressedDispatcher.onBackPressed() vs backPressedCallback.handleOnBackPressed()
Since the old Activity.onBackPressed() becomes deprecated starting Android 33, what is the better way to call it programmatically?
Example:
override fun onOptionsItemSelected(item: MenuItem): Boolean {...
0
votes
0
answers
19
views
I migrate my android project to androidX, change all needed to be change, but some new errors appears on things I don't touch, Why?
I migrate my application on AndroidX, I fix many problem resulting, until I can build succesly my project. But when I launch my application(success) and try to use it, I have some bug and the app ...
2
votes
0
answers
217
views
HTML in Jetpack Compose Text
I tried to enable HTML strings, especially with links e.g.:
"We are a <a href="/about/about_team.htm">team</a> of professionals working hard to provide free learning content....
0
votes
0
answers
77
views
SplashScreen API attributes not working on night mode
The project has day and night theme but some styling attribute of Splash Screen API does not work well.
Android Lollipop SDK 21
<style name="Theme.App.Starting" parent="Theme....
0
votes
0
answers
13
views
How do you write an Androidx Instrumentation that runs multiple Instrumentations?
I want to write an Androidx test that starts an Application, waits for it to crash, and then starts it again.
As I understand it, by default, AndroidX tests run on a instrumentation, and when one test ...
0
votes
0
answers
36
views
Layout inside TextInputLayout:
I'm trying to put ChipLayout inside TextInputLayout:
<com.google.android.material.textfield.TextInputLayout
android:id="@+id/text_layout_author"
android:layout_width="0dp&...
0
votes
1
answer
39
views
Difference between minCompileSdk and compileSdk
Looking at this release note for AppCompat, there is now a minCompileSdk I wonder what is the difference of this from compileSdk
0
votes
0
answers
12
views
Want to create a custom FrameLayout class that implements NestedScrollParent3
I'm new to android development. currently I'm creating a widget so I need to create an FrameLayout with scroll effect. When look at the android docs come across the abstract/interface class ...
0
votes
0
answers
26
views
How to toggle androidx.SearchView search icon to back arrow
I want to toggle button search with search icon to a back button with a back functionality and icon.
I am using androidx searchView without a ToolBar to fulfill a product requirement, so OptionsMenu ...
3
votes
0
answers
82
views
Start and end indices of AnnotatedString varies by language
I used this (not so nice anymore) example to enable linkification on my Android Jetpack Compose Text composable (see section with "The ClickableText handles link on text").
That works so far ...
2
votes
2
answers
246
views
Baseline Profiles x R8/Proguard
I've been experimenting with Android's Baseline Profile & MacroBenchmark libraries for improving the app performance.
The question I have is that it is suggested that the MacroBenchmark's build-...
0
votes
0
answers
42
views
Fatal Exception: java.lang.NoClassDefFoundError Failed resolution of: Ld2/a;
It is the stange error heppened for some devices like Samsung S21, S20, Huawei P20.
Seems it happens on app's launch regarding to firebase crashlytics.
I've updated dependencies to the latest but it ...
0
votes
1
answer
98
views
Custom Camera X inside Activity/Fragment Error ( requires 'compileSdkVersion' set to 32 or higher)
So I've been trying to create a custom camera inside an activity/fragment using CameraX. As at now, the latest version of that family of cameras (androidx.camera...) is 1.2.0-alpha02. So I update them ...
0
votes
1
answer
58
views
How to correctly set windowDrawsSystemBarBackgrounds in XF5?
We've been upgrading our application to Xamarin.Forms 5 and it's unclear how to correctly set the AppCompat theme now that we've migrated to the AndroidX package. When using
<style name="...
0
votes
0
answers
79
views
Android Studio: Failed to resolve: com.linkedin.android.litr:litr:1.1.0 while using cloudinary in my android app
I am building the android app that uses Cloudinary to upload images and videos. I am using AndroidX for both frontend and backend. I have all the related dependencies such as implementation 'com....
1
vote
0
answers
32
views
Difference between AndroidX Transition library (androidx.transition) and the Android Transition Framework (android.transition)
What is the difference between androidx.transition and android.transition?
From https://material.io/develop/android/theming/motion, it says that androidx.transition is AndroidX Transition library, ...
2
votes
1
answer
137
views
Using kotlin.UByte for Room Entity not working
I want to store the following dataclass in my room database. Somehow, I do not succeed:
@Entity
data class UInt8(
@PrimaryKey(autoGenerate = true)
var key: Int,
var name: String = "...
0
votes
0
answers
62
views
Android 12 Splash API first install do not show vector AVD and neither exitAnimation
I am using the new Splash Screen implementation as Google documentation says:
https://developer.android.com/guide/topics/ui/splash-screen
Also I did the migration on my existing Splash Screen
https://...
0
votes
1
answer
67
views
AndroidX GridLayout: incorrect layout when cell content changes
I am using an AndroidX GridLayout to display a 2x2 grid of content using the following XML layout:
<androidx.gridlayout.widget.GridLayout
android:id="@+id/gridlayout_first"
...
-2
votes
1
answer
34
views
Why AndroidX element doesn't work? Element is not allowed here
I've made some changes to migrate my App to AndroidX manually because the Refactor tool doesn't work properly, following this map file. Amoung those changes I've updated Firebase imports in my build....
0
votes
0
answers
14
views
How can the Android OS identify AndroidX fragments if they are obfuscated?
I am doing a reverse-engineering work related to Android fragments. I found out in many apks (decompiled with apktool, dexToJar, ...), the androidx.fragment.app.Fragment class is obfuscated. In most ...
0
votes
0
answers
80
views
error: Program type already present: android.support.v4.app.INotificationSideChannel when add com.google.android.gms
I know it could look like This Question but I could not fix it with the solution proposed and I could not comment on it too. The Error is : After add
implementation 'com.google.android.gms:play-...
0
votes
0
answers
20
views
How to find AGDK GameTextInput package in CMakeLists?
I'm trying to follow the instructions here for integrating GameTextInput from the AGDK (Android Game Development Kit), but am having trouble with the CMakeLists part.
Adding this line as instructed:
...
0
votes
0
answers
11
views
Is there a write guarantee when using Androidx DataStore
My app stores a list of small objects (3-10 elements) and recovers these after it was stopped and started again.
Currently I am using ContentProvider to store these objects. Recently I have started ...
0
votes
1
answer
73
views
I migrated existing android project to Android X using Android Studio, but I am unable to import/resolve any androidx library - what am i doing wrong?
I recently migrated an old android project to Android X using the automated Android Studio route. My gradle dependencies are all there, but I am unable to use any androidx library. Can you please ...
3
votes
1
answer
62
views
After cleaning gradle, androidx-test.core module throws merged-manifest errors
In a react-native project, ive recently updated to v66.4 from v63.2
after some dependency conflict troubleshooting, i ultimately get a merged manifest error, that indicates suggestions for 3 locations
...