• 15

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

Application Id based on build type

I need to change full application Id based on build type not adding a suffix after Id. I have tried to move applicationId inside each build type but Gradle uses the last one in the last build type by default. Is that possible?

You can use gradle filter to ignore some build/flavor targets please check this code

variantFilter { variant ->
   def flavor = variant.flavors*.name
   def buildType = variant.buildType*.name

   // To check for a certain build type, use variant.buildType.name == "<buildType>"
   if ((flavor.contains("xyz") && buildType.contains("debug"))) {
       // Gradle ignores any variants that satisfy the conditions above.


  • 1
Reply Report

In order to change your applicationId you need to change your package in the manifest and in all your directories

  1. Go to top left corner of Android Studio where it says Android
  2. Click on it and change it to Project Files as of Android Studio 3.3
  3. Right next to the side of Project Files click on the gear and Uncheck "Compact Directories"
  4. Open folders -> click on app -> src -> main -> java -> your -> package -> name
  5. Now that you see individual folders, right click the parts that you want to change -> Refactor -> Rename

Then you can change you applicationId and package in your AndroidManifest.xml

Hope it helps

source: Change Application Id Official Android Documentation

  • 0
Reply Report