How to Add Plurals or Different Texts for a Certain Quantity in Android Studio Using Java (Using Text Resources)

How to Add Plurals or Different Texts for a Certain Quantity in Android Studio Using Java (Using Text Resources)

Tiempo de lectura: 2 minutos Photo by Ákos Szabó First, we will define the plural messages in the strings.xml file, located in the res/values/ folder. This file contains the text resources used in the application. In this case, as an example, we will display different text depending on the number of messages we have. In the plural text item quantity=»other», … Read more

Resolve Android Studio Error ‘Cannot fit requested classes in a single dex file…’

Tiempo de lectura: < 1 minuto This error appears when trying to create a build (apk/aab) with Android Studio. To solve it, we have to go to the build.gradle of the app and add into defauldConfig: multiDexEnabled true Remaining as follows: android { defaultConfig { … multiDexEnabled true … } DevCodeLightdevcodelight.com

Fix error ‘Your advertising ID declaration in Play Console indicates that your application uses an advertising ID.’ in Google Play console when uploading an application.

Fix error ‘Your advertising ID declaration in Play Console indicates that your application uses an advertising ID.’ in Google Play console when uploading an application.

Tiempo de lectura: < 1 minuto Today we’re going to learn how to fix the error that appears on Google Play when uploading an update or a new app that contains advertising: “Your advertising ID declaration in Play Console indicates that your application uses an advertising ID. A manifest file of one of your active artifacts does not include the com.google.android.gms.permission.AD_ID … Read more

Create a Splash Screen in Android

Create a Splash Screen in Android

Tiempo de lectura: 2 minutos Create a splash screen ad in an Android application is a relatively simple process. Here, I provide you with a step-by-step tutorial using the Kotlin programming language and the Android Studio development environment. 1. Create a new project in Android Studio: Open Android Studio and select “New Project.” Complete the basic project setup. 2. Design … Read more

Fixing error Duplicate class com.google.android.gms.internal.measurement.zzhx found in modules jetified-play-services-measurement when updating Google Play Service Ads.

Fixing error Duplicate class com.google.android.gms.internal.measurement.zzhx found in modules jetified-play-services-measurement when updating Google Play Service Ads.

Tiempo de lectura: < 1 minuto   When updating the version of com.google.android.gms:play-services-ads: to 2.5.0, you may encounter the following error: A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable > Duplicate class com.google.android.gms.internal.measurement.zzhx found in modules jetified-play-services-measurement-base-20.1.2-runtim … *Continues with more errors. The issue is that we also need to update the Firebase version. To update it, we should set the version 30.1.0 … Read more

Create a banner with AdMob on Android using Java or Kotlin

Create a banner with AdMob on Android using Java or Kotlin

Tiempo de lectura: 3 minutos Create a banner with AdMob in an Android application is a process that involves several steps. Below, I will provide you with a basic step-by-step tutorial using Java or Kotlin and the AdMob SDK. Step 1: AdMob Configuration Create an AdMob account: If you don’t have an AdMob account yet, go to AdMob and sign … Read more

Create popup or alert in Android Studio with Java

Create popup or alert in Android Studio with Java

Tiempo de lectura: < 1 minuto Creating a popup or alert in Android Studio using the Java programming language is straightforward. The component we’ll use to create the popup is AlertDialog, which we’ll create with a title, a message, and two buttons: “Accept” and “Cancel.” Then, we define actions for each button using setPositiveButton and setNegativeButton. In this case, clicking either … Read more

GET call in Android Studio with Java

GET call in Android Studio with Java

Tiempo de lectura: 2 minutos Photo by Bri Schneiter from Pexels To create a list of elements obtained from a GET call and display them, you need to follow the steps outlined in the example below. First, create an XML file to define the view with the list. To display a list, we will use the “ListView” element. Photo by … Read more

List in Android Studio using Java

List in Android Studio using Java

Tiempo de lectura: 2 minutos To create a list of items and display them on Android, follow these steps as shown in the example. First, create an XML file to define the view with the list. To display a list, we will use the “ListView” element. <?xml version=”1.0″ encoding=”utf-8″?> <RelativeLayout xmlns:android=”http://schemas.android.com/apk/res/android” android:layout_width=”match_parent” android:layout_height=”match_parent”> <ListView android:id=”@+id/listView” android:layout_width=”match_parent” android:layout_height=”match_parent”/> </RelativeLayout> Next, create … Read more