andym
06/17/2020, 4:25 AM`at`ExperimentalContracts
fun isMyFeatureSupported(): Boolean {
contract {
// The implies expression fails to build with "Error in contract description: unsupported construction"
returns(true) implies (Build.VERSION.SDK_INT >= BUILD.VERSION_CODES.something)
}
return (Build.VERSION.SDK_INT >= BUILD.VERSION_CODES.something) &&
myFeatureTest()
}
Shubham11207
06/17/2020, 9:46 AMAnaniya
06/17/2020, 1:26 PMif(x != null)
)*" i spend over 1 n half week stucked trying to solve this problem 😭 please please help memending3
06/17/2020, 3:05 PMviewModelScope.launch {
try {
val apiRes = AccountRepository().connect.createAccount(accountName.value, phoneNumber.value?.toInt())
_showNotif.postValue("success")
} catch (throwable: Throwable) {
when (throwable) {
is IOException -> _showNotif.postValue(throwable.message)
is HttpException -> _showNotif.postValue("${throwable.code()}")
else -> _showNotif.postValue(throwable.message)
}
}
}
I want to catch an exception from retrofit. the api returns 500. however why does the viewModelScope return me the success message indicated by _showNotif.postValue("success")
code?Rita Okonkwo
06/17/2020, 3:46 PMMark
06/18/2020, 4:01 AMval normalized =
normalize(
flds[0]
)
If I select the single-line version of this and perform “Reformat code” then it doesn’t change, so I don’t think this is due to code formatting settings. And to be clear, it’s nowhere near hitting the line length limit.Striker
06/18/2020, 8:51 AMReiko
06/18/2020, 2:07 PMDavide Giuseppe Farella
06/18/2020, 4:56 PM> Transform artifact assert4k-jvm-0.2.2.jar (studio.forface:assert4k-jvm:0.2.2) with DexingWithClasspathTransform
AGPBI: {"kind":"error","text":"Class descriptor 'Lassert4k/CollectionKt$is not$2;' cannot be represented in dex format.","sources":[{}],"tool":"D8"}
> Task :app:mergeExtDexBetaDebugAndroidTest FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeExtDexBetaDebugAndroidTest'.
> Could not resolve all files for configuration ':app:betaDebugAndroidTestRuntimeClasspath'.
> Failed to transform assert4k-jvm-0.2.2.jar (studio.forface:assert4k-jvm:0.2.2) to match attributes {artifactType=android-dex, dexing-enable-desugaring=true, dexing-is-debuggable=true, dexing-min-sdk=21, org.gradle.libraryelements=jar, org.gradle.status=release, org.gradle.usage=java-runtime, org.jetbrains.kotlin.platform.type=jvm}.
> Execution failed for DexingWithClasspathTransform: /Users/davide/.gradle/caches/modules-2/files-2.1/studio.forface/assert4k-jvm/0.2.2/3c15ade7f5afff280c26ca8346b645c620f3af76/assert4k-jvm-0.2.2.jar.
> Error while dexing.
Any idea?mending3
06/19/2020, 3:30 AMJeff
06/19/2020, 7:16 AMExecution failed for task ':commons:ui:checkQaDebugAndroidTestDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class androidx.appcompat.content.res.AppCompatResources found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.content.res.AppCompatResources$ColorStateListCacheEntry found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$1 found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatableTransition found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatedStateListState found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimatedVectorDrawableTransition found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$AnimationDrawableTransition found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$FrameInterpolator found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.AnimatedStateListDrawableCompat$Transition found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$1 found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$BlockInvalidateCallback found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableContainer$DrawableContainerState found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.DrawableWrapper found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.StateListDrawable found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.graphics.drawable.StateListDrawable$StateListState found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.DrawableUtils found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.ResourcesWrapper found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.TintContextWrapper found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.TintInfo found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.TintResources found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Duplicate class androidx.appcompat.widget.VectorEnabledTintResources found in modules appcompat-1.0.0-runtime (androidx.appcompat:appcompat:1.0.0) and jetified-appcompat-resources-1.1.0-runtime (androidx.appcompat:appcompat-resources:1.1.0)
Saket Poddar
06/19/2020, 11:52 AMJerryMiah
06/19/2020, 5:37 PMvapoyan
06/20/2020, 2:53 PMTarunY
06/21/2020, 8:04 AMzalewski.se
06/21/2020, 1:39 PMmending3
06/22/2020, 8:52 AMstarke
06/23/2020, 2:19 AMManpreet Kunnath
06/23/2020, 9:22 AMRoman Abaev
06/23/2020, 12:05 PMSijan Rijal
06/24/2020, 4:37 AMSijan Rijal
06/24/2020, 4:43 AMViresh
06/24/2020, 10:33 AMCombine
framework but was not able to do.Saurabh
06/24/2020, 12:54 PMIsaac
06/24/2020, 2:24 PMMatiasdelbel
06/24/2020, 3:03 PMsrc/main
folder inside the buildSrc
folder... Is there a way I can access to the files inside src/main
from the build.gradle.kts
file?pucherd
06/25/2020, 8:21 AMNoel Nwaelugo Orisaemeka
06/25/2020, 4:54 PMvesp
06/25/2020, 7:42 PMGlide
, Bitmap
, Canvas
, and Paint
and I managed to create code to apply a mask using PorterDuff
. Although I managed to complete the task, the Kotlin is kinda unsightly. Can I have some help trying to make function look more like Kotlin? I'm a junior-ish dev so any insights can help. I can DM code or share in comments.lawlorslaw
06/26/2020, 12:30 AMlawlorslaw
06/26/2020, 12:30 AMIsaac
06/26/2020, 8:18 AMMatiasdelbel
06/26/2020, 1:55 PMval viewModel by viewModels { }