Android 同时安装debug release版, 并且显示不同名字
来源:互联网 发布:券妈妈优惠券淘宝 编辑:程序博客网 时间:2024/06/05 05:43
同一部手机上安装app的debug版和release版, 不会相互覆盖.
build.gradle
buildTypes { release { applicationIdSuffix ".release" resValue "string", "app_name", "@string/app_name_release" } debug { applicationIdSuffix ".debug" resValue "string", "app_name", "@string/app_name_debug" }
strings.xml
<resources> <string name="app_name_release">Release</string> <string name="app_name_debug">Debug</string></resources>
AndroidManifest.xml
<application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity" android:label="@string/app_name"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application>
另外, 也可以让debug release版使用不同的ic_launcher
在src下面创建debug-res-mipmap-xx, 放入对应的ic_launcher.png用对应版本编译就行了.
阅读全文
0 0
- Android 同时安装debug release版, 并且显示不同名字
- Android 同一手机上安装不同版本debug和release同时存在,logo名称自定义
- Release 和 Debug版有什么不同
- Debug&Release的不同
- android 多任务同时下载并且显示
- vc++同时生成 Release版和Debug版的方法
- vc++同时生成 Release版和Debug版的方法
- Debug与Release的不同
- 关于android生成debug和release版
- Android debug与release
- vc中debug和release的不同
- vc中debug 和release的不同
- vc中debug和release的不同
- C++ Debug 和 Release 运行结果不同
- VC中DEBUG与RELEASE的不同
- Qt debug release包含不同的lib
- debug和release的不同结果
- Android在debug和release模式自动加载不同的配置文件
- Windows GDI和GDI+编程实例剖析
- add-apt-repository: command not found
- 保留地址段
- HDU 6035 Colorful Tree(虚树)
- hdu 6035 Colorful Tree(dfs)
- Android 同时安装debug release版, 并且显示不同名字
- Resource interpreted as Document but transferred with MIME type application/json:
- Android中Activity.this,getApplicationContext(),getBaseContext()和this详解
- 移动端web开发技巧
- 链表中倒数第k个结点
- AES128加密解密以及参数的处理
- codeforces—— 467B —— Fedor and New Game
- ionic中如何隐藏头部的返回按钮
- ThreadLocal工作原理