debugging - Android Studio: how to create a second debug build type -


i want create second build type should work existing debug type. have 2 build types: debug , release. debug 1 can run single click, , automatically signed debug keystore. manually compile release build through build -> generate signed apk wizard.

so clone debug build type, first added second build type named "local" app build.graddle file:

buildtypes {     ...     debug {         debuggable true         minifyenabled false     }     local {         debuggable true         minifyenabled false     } } 

then created app/src/local/res , added files.

then gradle resync , select new build type in left tab: build type tab

finally click run button , expected work. intellij article says debug signing config default:

this means if not configure artifact manually , select deploy default apk option in run/debug configuration: android application dialog box, intellij idea use predefined values in certificate generated

instead, dialog shown:

run dialog

when click fix button, opens signing config dialog whole app module. however, don't want sign apk release, need signed debug cert. noticed new assemblelocal gradle task has been created, generates unaligned apk. in folder can see regular debug apks generated correctly in unaligned , final versions.

how on earth can clone debug build type?

also, can make build type similar debug using:

initwith(buildtypes.debug) 

here example:

... buildtypes {      release {         minifyenabled false         proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro'         buildconfigfield 'string', 'url_api_base_service', '"http://theidasworld.com"'     }     debug {         buildconfigfield 'string', 'url_api_base_service', '"http://debug.theidasworld.com"'     }     inspection {         initwith(buildtypes.debug)         buildconfigfield 'string', 'url_api_base_service', '"http://inspection.theidasworld.com"'     } } ... 

Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

How to get the ip address of VM and use it to configure SSH connection dynamically in Ansible -

javascript - Get parameter of GET request -