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 ..
Category : build.gradle
I am new to Android sdk. I have a quick question. I am trying to use mapBox in android sdk. So far I have downloaded the zip file from github, and opened within a new, empty android sdk project. Everytime I do, I get a window that will say "would you like to open in ..

I have a step counter Andriod app, I have to upload it on playstore and it’s not working with targetSDKversion defined as playstore needs a API level 29+ and this default API is 28 (Playstore Console told) this is the /build.gralde file buildscript { repositories { google() maven { url ‘https://maven.google.com/’ name ‘Google’ } jcenter() ..
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 ..
I went through related posts on SO and had a look at the accepted answers and suggestions. Unfortunately, either they are not applicable or they do not work in my case. The build.gradle looks like this: … def getHostUrl = { -> def host = project.hasProperty(‘hostUrl’) ? hostUrl : "default.example.com" println "host is set to ..
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 ..
How to setup CMake 3.18.1 in an Android project with gradle on Android Studio? I executed the following steps: downloaded the CMake 3.18.1 from Android Sdk – Sdk Tools (folder appeared correctly on Android/sdk/cmake with the 3.10 and 3.6 version) I added the version requested on build.gradle as externalNativeBuild { cmake { version "3.18.1" I ..
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 ..
I’m completely new to android and I’m trying some stuff. But there is a problem that I can’t resolve. I’m trying to import some android support library and even if it seems like I did it properly by adding google() to my Gradle build, and by clicking Sync Now there is an error. I even ..
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()" ..
Recent Comments