androidx

takePicture require executor on CameraX (1.0.0-alpha06)

早过忘川 提交于 2019-12-23 09:17:11
问题 After update from androidx.camera:camera-core:1.0.0-alpha03 to androidx.camera:camera-core:1.0.0-alpha06 signatures of methods setTargetAspectRatio (in ImageCaptureConfig.Builder) and takePicture (in ImageCapture) have been changed. Official documentation and info in web doesn't show how to use new methods (how to specify executor). Code which broken after update: ... val captureConfig = ImageCaptureConfig.Builder() .setTargetAspectRatioCustom(Rational(1, 1)) //this method changed

Can't inflate ConstraintLayout

纵饮孤独 提交于 2019-12-23 07:40:47
问题 Each time my app crashes because it can't find Landroidx/constraintlayout/widget/R$styleable in classpath. I tried to rebuild, invalidate cache but it always gives me the same error in runtime. I tried both versions 1.1.2 and 1.1.3. And interesting: when using 1.1.3 androidX Jetifier just forces using 1.1.2 as you can see from gradle report Caused by: android.view.InflateException: Binary XML file line #2: Binary XML file line #2: Error inflating class androidx.constraintlayout.widget

Snackbar package in AndroidX

随声附和 提交于 2019-12-23 06:50:11
问题 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 migration table does not list the correct new package for this component. 回答1: This took a long time to resolve, as until your project successfully builds, autocomplete will not function to lookup packages. The correct package to use is: com.google

Error inflating class com.google.android.material.navigation.NavigationView after migration to AndroidX

我是研究僧i 提交于 2019-12-22 08:06:09
问题 After I updated my project to AndroidX with targetSdkVersion set to 28, my project crashes on installing it from the store for beta testing. The following is the error log I receive: 2019-07-08 08:28:33.026 32011-32011/? E/AndroidRuntime: FATAL EXCEPTION: main Process: hu.itq.oakprotection, PID: 32011 java.lang.RuntimeException: Unable to start activity ComponentInfo{hu.itq.oakprotection/hu.itq.oakprotection.MainActivity}: android.view.InflateException: Binary XML file line #15: Binary XML

BottomNavigationView inflate error after migrating to androidx

删除回忆录丶 提交于 2019-12-22 05:10:46
问题 When I try to launch my app, my Mainactivity throws this error in the oncreate() method at "setContentView(R.layout.activity_main);" : java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.sanchez.worldgramproject/com.example.sanchez.worldgramproject.Fragments.MainActivity}: android.view.InflateException: Binary XML file line #16: Binary XML file line #16: Error inflating class android.support.design.widget.BottomNavigationView This Error appeared after migrating to

MultiDexApplication class in secondary dex file not found when using AndroidX

*爱你&永不变心* 提交于 2019-12-21 05:25:13
问题 I'm using 'androidx.multidex:multidex:2.0.0' and I'm pointing to the MultiDexApplication class from the manifest using: <application android:name="androidx.multidex.MultiDexApplication" ... On the build.gradle I also added the follwoing entry: defaultConfig { ... multiDexEnabled true ... When running the application in Android versions older than 5.0 (API 21) I get the following exception: java.lang.RuntimeException: Unable to instantiate application androidx.multidex.MultiDexApplication:

dagger android support to androidx.fragment

时光毁灭记忆、已成空白 提交于 2019-12-20 17:33:24
问题 How to inject a fragment from the package androidx.fragment.app.Fragment ? I'm using the dagger-android framework to inject my dependencies in my code. As the documentation says I do this to inject my fragment @Override public void onAttach(Activity activity) { AndroidInjection.inject(this); super.onAttach(activity); // ... } the problem is that AndroidSupportInjection class accept only fragments of the package android.support.v4.app.Fragment or if I use AndroidInjection class only accept

Error: Class kotlin.reflect.jvm.internal.FunctionCaller$FieldSetter

♀尐吖头ヾ 提交于 2019-12-20 10:09:48
问题 I've tried everything to get rid of this error but it keeps coming back. Class kotlin.reflect.jvm.internal.FunctionCaller$FieldSetter can not access a member of class com.android.build.gradle.tasks.ManifestProcessorTask with modifiers "private" __ org.gradle.api.internal.tasks.DefaultTaskContainer$TaskCreationException: Could not create task ':app:processDebugAndroidTestManifest'. at org.gradle.api.internal.tasks.DefaultTaskContainer.taskCreationException(DefaultTaskContainer.java:673) at org

Failed to resolve variable '${animal.sniffer.version}' when migrate to AndroidX

不想你离开。 提交于 2019-12-20 08:40:02
问题 I'm using Android Studio 3.2 Beta5 to migrate my project to AndroidX . When I rebuild my app I got these errors: ERROR: [TAG] Failed to resolve variable '${animal.sniffer.version}' ERROR: [TAG] Failed to resolve variable '${junit.version}' Full clean & rebuild did not work! Anyone know how to fix this? gradle.properties android.enableJetifier=true android.useAndroidX=true build.gradle buildscript { repositories { google() jcenter() mavenCentral() maven { url 'https://maven.fabric.io/public' }

UNable to implement androidx.appcompat.appcompat:1.0.0

前提是你 提交于 2019-12-20 04:16:25
问题 I am an absolute beginner in Android development and trying to build test automation to test mobile apps. After going through weeks of setting up IntelliJ, I am still facing issues and among them is the following. As I am using SDK ver 29, I was told that I should convert all "support" keyword to androidx's format as per below: SO, when I applied it, I am having the red sqiuggly line indicating error at the end of the "1.0.0" as shown below The following is my app/build.gradle android {