androidx

Application class not found after upgrading to Android X

旧街凉风 提交于 2021-01-29 11:15:55
问题 I am facing one very weird issue. I have migrated one of my old projects to AndroidX . And I have upgraded all the dependencies so I would get all the dependencies with AndroidX support also. But somehow after doing all this, My app is crashing with this error log: java.lang.RuntimeException: Unable to instantiate application com.example.MYApplication: java.lang.ClassNotFoundException: Didn't find class "com.example.MYApplication" Did anyone face the same issue? Please let me know any

After migration to androidX: Databinding problem (Android Studio 4)

独自空忆成欢 提交于 2021-01-29 10:32:19
问题 I migrated a project to androidx. I changed the xml-files by hand an I also set the imports manually, where Android Studio wasn't successful. When I try to rebuild the project, the following error occurs in the compiled file DataBinderMapperImpl.java The head of this file: package com.xxxx.todo; import android.util.SparseArray; import android.util.SparseIntArray; import android.view.View; import androidx.databinding.DataBinderMapper; import androidx.databinding.DataBindingComponent; import

java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: DefaultDispatcher-worker-2

扶醉桌前 提交于 2021-01-29 05:56:06
问题 I'm quite new about flutter and kotlin. I'm doing flutter version up(from 1.0.0 to 1.7.8+hotfix4) recently. After I upgrade kotlin version to 1.3.10, my flutter app came into crash when I try to start it. And the error shows like this : [ +521 ms] E/AndroidRuntime( 2726): FATAL EXCEPTION: DefaultDispatcher-worker-2 [+1 ms] E/AndroidRuntime( 2726): Process: XXXXXXXXXXXX, PID: 2726 [ ] E/AndroidRuntime( 2726): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the

java.lang.RuntimeException: Methods marked with @UiThread must be executed on the main thread. Current thread: DefaultDispatcher-worker-2

有些话、适合烂在心里 提交于 2021-01-29 05:50:33
问题 I'm quite new about flutter and kotlin. I'm doing flutter version up(from 1.0.0 to 1.7.8+hotfix4) recently. After I upgrade kotlin version to 1.3.10, my flutter app came into crash when I try to start it. And the error shows like this : [ +521 ms] E/AndroidRuntime( 2726): FATAL EXCEPTION: DefaultDispatcher-worker-2 [+1 ms] E/AndroidRuntime( 2726): Process: XXXXXXXXXXXX, PID: 2726 [ ] E/AndroidRuntime( 2726): java.lang.RuntimeException: Methods marked with @UiThread must be executed on the

ConstraintLayout Barrier not visible in design view

你离开我真会死。 提交于 2021-01-27 04:52:07
问题 I'm trying to add a barrier to my ConstraintLayout in Android Studio but it is not showing up the way it should in design view. I have been following this tutorial, but I can't get things to work properly. I'm currently using: Android Studio 3.1.1 androidx.constraintlayout:constraintlayout:1.1.3 Things I have tried: Invalidate caches/restart Removing the attribute tools:layout_editor_absoluteX Fiddling around! Here's my test.xml : <?xml version="1.0" encoding="utf-8"?> <androidx

AndroidX BottomAppBar navigation icon color

被刻印的时光 ゝ 提交于 2021-01-27 04:41:50
问题 I've defined a bottom bar in a layout like that: <com.google.android.material.bottomappbar.BottomAppBar android:id="@+id/bottomBar" android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" app:navigationIcon="@drawable/ic_menu_black_24dp" /> The navigation icon is a generic icon generated from the "new vector drawable" wizard. Is there a way to apply a tint to it? The bottom bar is not the activity action bar. What I've tried so far: applied a

How to make BiometricPrompt non-cancelable?

依然范特西╮ 提交于 2021-01-27 03:54:51
问题 I am using BiometricPrompt in my application. It works well and shows the dialog when call the authenticate() method. But this dialog gets closing when I click outside the dialog. How to prevent it? How to make BiometricPrompt's dialog non-cancelable? Here is no method like biometricPrompt.setCancelable(false) . 回答1: You have to use the version 1.0.0-beta01 or later. Now it is the default behavior: Touches outside no longer cancel authentication. Back button cancel authentication still. You

How to make BiometricPrompt non-cancelable?

时光怂恿深爱的人放手 提交于 2021-01-27 03:54:07
问题 I am using BiometricPrompt in my application. It works well and shows the dialog when call the authenticate() method. But this dialog gets closing when I click outside the dialog. How to prevent it? How to make BiometricPrompt's dialog non-cancelable? Here is no method like biometricPrompt.setCancelable(false) . 回答1: You have to use the version 1.0.0-beta01 or later. Now it is the default behavior: Touches outside no longer cancel authentication. Back button cancel authentication still. You

Update to androidx.fragment:fragment:1.3.0-alpha08: registerForActivityResult not allowed after onCreate anymore. How to use after onCreate?

走远了吗. 提交于 2021-01-22 06:01:49
问题 Initial Question (18/05/2020): So with the latest Update from androidx.fragment:fragment:1.3.0- alpha07 to androidx.fragment:fragment:1.3.0- alpha08 I get the error: FragmentXY is attempting to registerForActivityResult after being created. Fragments must call registerForActivityResult() before they are created (i.e. initialization, onAttach(), or onCreate()). I used to check permissions in my StartFragment (Single Activity App, in onViewCreated) after showing to the User information about

Update to androidx.fragment:fragment:1.3.0-alpha08: registerForActivityResult not allowed after onCreate anymore. How to use after onCreate?

拈花ヽ惹草 提交于 2021-01-22 06:01:05
问题 Initial Question (18/05/2020): So with the latest Update from androidx.fragment:fragment:1.3.0- alpha07 to androidx.fragment:fragment:1.3.0- alpha08 I get the error: FragmentXY is attempting to registerForActivityResult after being created. Fragments must call registerForActivityResult() before they are created (i.e. initialization, onAttach(), or onCreate()). I used to check permissions in my StartFragment (Single Activity App, in onViewCreated) after showing to the User information about