android-ktx

Why are there 2 different ComponentActivity classes?

耗尽温柔 提交于 2019-12-13 00:29:06
问题 I'm trying to handle back button presses in my fragments by registering an OnBackPressedCallback via addOnBackPressedCallback to receive onBackPressed() callbacks without needing to override the method in your activity (described Nov 5, 2018 release notes for androidx.activity) If you look at the AppCompatActivity Docs, it claims AppCompatActivity extends from androidx.activity.ComponentActivity . The problem I'm running into is, in my codebase, AppCompatActivity extends from androidx.core

Compile errors after updating to WorkManager 1.0.0-alpha09

*爱你&永不变心* 提交于 2019-12-10 03:31:58
问题 I'm trying to use WorkManager from architecture components. I've upgraded the compileSdkVersion and targetSdkVersion from 27 to 28. gradle sync is successfully done. But build-time error keeps popping up. android.support libraries are using version 28.0.0-rc02 because of the 'android.support:design'. I've tried to add packagingOptions in order to exclude 'proguard/androidx-annotations.pro'. But it didn't help. But this time I got a different error message: Program type already present: com

Compile errors after updating to WorkManager 1.0.0-alpha09

99封情书 提交于 2019-12-05 03:14:14
I'm trying to use WorkManager from architecture components. I've upgraded the compileSdkVersion and targetSdkVersion from 27 to 28. gradle sync is successfully done. But build-time error keeps popping up. android.support libraries are using version 28.0.0-rc02 because of the 'android.support:design'. I've tried to add packagingOptions in order to exclude 'proguard/androidx-annotations.pro'. But it didn't help. But this time I got a different error message: Program type already present: com.google.common.util.concurrent.ListenableFuture I could not figure out what's going wrong. build.gradle:

Compile errors after updating to WorkManager 1.0.0-alpha09

╄→尐↘猪︶ㄣ 提交于 2019-12-04 02:46:37
问题 I'm trying to use WorkManager from architecture components. I've upgraded the compileSdkVersion and targetSdkVersion from 27 to 28. gradle sync is successfully done. But build-time error keeps popping up. android.support libraries are using version 28.0.0-rc02 because of the 'android.support:design'. I've tried to add packagingOptions in order to exclude 'proguard/androidx-annotations.pro'. But it didn't help. But this time I got a different error message: Program type already present: com