Category "android-studio"

UI bug while updating recycler view

I'm using FirebaseUI FirestorePagingAdapter for recycler view adapter and the recycler view uses GridLayout type with 2 columns . The recycler view item block

My android app keeps crashing from which seems to be a permission problem despite granting the relevant permission in the Manifest

Below is the MainActivity code from which the problem is arising from. class MainActivity : AppCompatActivity(), NavigationView.OnNavigationItemSelectedListene

How can I use a virtual audio sink on an android emulator in headless mode? Getting pulseaudio init error when launching emulator

I have a virtual sink on my host machine. pulseaudio is running as a system wide daemon. When trying to launch an emulator with the follow command: emulator -av

Project Structure in Android

I am new to Android programming and wanted to know about the project structure. I wanted to test my app on an Emulator but somehow I could see the three Java mo

Usecase inside a custom view

First of all, sorry for my english, this is google translator. I am learning mvvm, maybe I have some misconception but I think I can understand it well. My goal

SpannableStringBuilder only keeping formatting for the first for loop

I am trying to use a for loop to add formatting using SpannableStringBuild from strings in a list, however in the TextView, despite all the strings having been

Android Studio Arctic Fox - projects not building after update

After updating android studio to current latest (2020.3.1.24) I'm not able to open any file/class/document inside it, run or build the project. Creating new pro

How to programmatically read and open Bluetooth location permission setting for Android app

I am designing an app in Android Studio. It scans for BLE (Bluettoth Low Energy) devices. As soon as I try to scan I get the following popup message: Location

Android Studio Layout Preview Default Theme

Maybe this is well known option in Android Studio but I couldn't find it and Google has not helped me with this :( Every time I open a layout preview in Android

Android studio emulator Stops

I am asking for your kind support. I have problem with Android studio emulator. The emulator always stops. It is quite annoying as I want to test the applicatio

Return the result from a RecyclerView adaptor back to the MainActvity.kt?

I am trying do I return the result of the position from my Recyclerview Adapter, but I can't call the " adapter.setOnItemClickListener(this)" from MainAc

SQLiteDatabase.insert() and SQLiteDatabase.execSQL("insert into ...") doesn't work

I'm working on an Android application in Java. In my application I need, among other things, to store an address in a database. My address is stored in a table

Unity android gradle build fails duplicate class

I have been looking for the last few days for a solution to my problem. I have multiple SDKs imported in my project (firebase, facebook, admob, etc) and it was

Different errors with Gradle each time I tried most, common: ':app:processDebugManifest' (type 'ProcessMultiApkApplicationManifest')

A lot of errors building the gradle: Gradle Scripts build.gradle(Project:): plugins { id 'com.android.application' } android { compileSdkVersion 31

An unexpected packet was received before the handshake. - Android Studio

When I run the Flutter project on Android Studio, before running the application on the emulator, the event log displays "An unexpected packet was received befo

Manifest merger failed : Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported`

Please help me with this error getting in my project while trying to run at mobile via android studio. Manifest merger failed : Apps targeting Android 12 and hi

Failed resolution of Landroidx / ActivityCompat;

I'm trying to make a java library for my Unity game. In this case I want get permission from Android API. However, I get an error: AndroidJavaException: java.la

recursion and ram flood: Starting a Gradle Daemon, 1 busy and 6 stopped Daemons could not be reused, use --status for details

I'm using this plugin https://github.com/mozilla/rust-android-gradle, which requires me to add tasks.whenTaskAdded { task -> if ((task.name == 'javaPreCo

MainActivity is not showing log statements

Hi I am new to android development and the problem is Whenever I am using MainActivity in logcat as a filter it is not showing me Log statements for this Log.i

Fatal Exception startactivity in Android studio

I am totally new at Android / Java. and i have some project school and i have this code ``` package com.example.utsmobileprograming; import androidx.appcompat.a