Emulator: WARNING: HAXM 6.0.5 is installed. Please install HAXM >= 6.2.1 to fix compatibility issues on Mac

Navigate to [Android SDK Folder] –> Extra –> Intel –> Hardware_Accelerated_Execution_Manager and double click on HAXM installer intelhaxm-android.exe (on Mac IntelHAXM_6.2.1.dmg) and install it manually. If you do not have latest version of HAXM then you can open sdk manager in android studio and download it. Although, this should be installed automatically when you install … Read more

what is causing “cannot resolve symbol GradleException” in a flutter project?

Set Project SDK to Android API Platform versionĀ 29 (or the latest version, 30), like so: defaultConfig { … minSdkVersion 16 targetSdkVersion 30 } and update GradleException() to FileNotFoundException() Please follow it: https://github.com/flutter/flutter/issues/29608#issuecomment-548649907 This works for me, Thanks

android:autoSizeTextType in Jetpack Compose

I use the following to adjust the font size with respect to the available width: val textStyleBody1 = MaterialTheme.typography.body1 var textStyle by remember { mutableStateOf(textStyleBody1) } var readyToDraw by remember { mutableStateOf(false) } Text( text = “long text goes here”, style = textStyle, maxLines = 1, softWrap = false, modifier = modifier.drawWithContent { if (readyToDraw) … Read more

Set Background Color of Navigation Drawer

In your activity_main.xml include the following <android.support.design.widget.NavigationView android:id=”@+id/navigation_view” android:layout_width=”wrap_content” android:layout_height=”match_parent” android:layout_gravity=”start” app:headerLayout=”@layout/navigation_drawer_header” app:menu=”@menu/menu_drawer” android:background=”@color/color_navigation_list_background” app:itemIconTint=”@color/color_selector_navigation_item” app:itemTextColor=”@color/color_selector_navigation_item”/>

Updated Android Studio to 3.0 and getting this issue

You can add the following line inside your default config of your app build.gradle: defaultConfig{ vectorDrawables.useSupportLibrary = true } Edit: you also need to add this dependency if you didn’t already dependencies { compile ‘com.android.support:appcompat-v7:27.1.1’ } Update: Since Gradle 3.4 the compile configuration is deprecated and should be replaced by implementation: dependencies { implementation ‘com.android.support:appcompat-v7:27.1.1’ … Read more

“Extension with name ‘android’ does not exist” error when adding Kotlin to Android project

Android Studio modifies your build.gradle adding apply plugin: ‘kotlin-android’ above apply plugin: ‘com.android.application’. Just move the Kotlin line below the Android one and Gradle will run smoothly. It should look like this example: apply plugin: ‘com.android.application’ apply plugin: ‘kotlin-android’

android dynamically change style at runtime

Following sample code changes the size/style of the text dynamically on runtime. attrs.xml <?xml version=”1.0″ encoding=”utf-8″?> <resources> <!– View styles –> <attr name=”textTitle” format=”reference” /> <attr name=”textBody” format=”reference” /> </resources> styles.xml <?xml version=”1.0″ encoding=”utf-8″?> <resources> <style name=”small_title_text”> <item name=”android:textSize”>22sp</item> <item name=”android:textColor”>@color/green</item> <item name=”android:textStyle”>normal</item> <item name=”android:paddingBottom”>5dip</item> </style> <style name=”small_body_text”> <item name=”android:textSize”>16sp</item> <item name=”android:textColor”>@color/white</item> <item name=”android:textStyle”>normal</item> <item … Read more