Category : build.gradle

I have a compile-time error with the samples provided in the code-labs. This is the ViewModel class VM : ViewModel() { val isVisible = MutableStateFlow(true).asStateFlow() } This is what I’d like to write: @Composable fun Whatever(vm: VM = viewModel()) { val isVisible by vm.isVisible.collectAsState(true) // Use is visible here } But it yields to the ..

Read more

I follow this documentation to add a flutter module into Android project. I add this code in settings.gradle /* Flutter embed modules */ setBinding(new Binding([gradle: this])) evaluate(new File(settingsDir.parentFile, ‘libs/flutter_student_embed/include_student_embed.groovy’)) include ‘:flutter_student_embed’ project(‘:flutter_student_embed’).projectDir = new File(rootProject.projectDir, ‘/../libs/flutter_student_embed’) /* aylearn student transport */ setBinding(new Binding([gradle: this])) evaluate(new File(settingsDir.parentFile, ‘apps/aylearn_student_transport/.android/include_flutter.groovy’)) include ‘:aylearn_student_transport’ project(‘:aylearn_student_transport’).projectDir = new File(rootProject.projectDir, ‘/aylearn_student_transport’) and ..

Read more

My attempt failed to build.gradle for com.squareup.retrofit2 module implementation "com.squareup.retrofit2:convertor-gson:${retrofitVersion}" implementation "com.squareup.retrofit2:adapter-rxjava2:$retrofitVersion" with the error message: Failed to resolve: com.squareup.retrofit2:convertor-gson:2.7.1 My project level build.gradle file is: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { google() maven { url "https://jitpack.io" } jcenter() } dependencies { classpath ..

Read more

I’ve updated my android support repository and invalidated and restarted my cache/ide and I’m still getting the following error on gradle build. I’ve seen several answers from 2 years ago, but I’m thinking that the up to date Android and Flutter packages are requiring new solutions. Please provide any ideas or rabbit holes for me ..

Read more

I have the following in a function in one of my gradle tasks: def shaid = "git rev-parse HEAD".execute().text println("SHA-ID: $shaid") Output from gradlew: SHA-ID: 74037b694511b61100dca19f62ec298aeeef7b1c Output from Android Studio: SHA-ID: The code runs correctly when using the gradle wrapper (gradlew) but the variable is empty when running from Android Studio. I suspect that "execute()" ..

Read more