android - How to change release variant to debug variant?
问题描述
I have downloaded the Shuttle Music Player from GitHub and stuck with this problem while syncing project with Gradle. How can I fix this problem??
//This is the Module Gradle
import dependencies.Dependencies
apply plugin: Dependencies.BuildPlugins.androidLibrary
android {
compileSdkVersion Dependencies.compileSdk
defaultConfig {
minSdkVersion Dependencies.minSdk
targetSdkVersion Dependencies.targetSdk
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation Dependencies.Google.appcompat
}
//This the App Gradle
import dependencies.Dependencies
apply plugin: Dependencies.BuildPlugins.androidLibrary
android {
compileSdkVersion Dependencies.compileSdk
defaultConfig {
minSdkVersion Dependencies.minSdk
targetSdkVersion Dependencies.targetSdk
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation Dependencies.Google.appcompat
}
WARNING: Module 'navigation' has variant 'debug' selected, but the module ''app'' depends on variant 'release' Select 'navigation' in "Build Variants" window Fix problem
解决方案
在你的 android studio 中有一个选项卡构建变体(通常在文件视图的左侧),在那里你会看到选择了每个依赖项的变体。尝试更改它以查看“导航”是否具有发布变体。此外,您的应用在 buildTypes 中缺少调试变体,这导致应用使用发布变体。尝试向您的应用程序添加调试变体,然后检查它是否使用调试构建。
推荐阅读
- installation - 从现有项目访问 Kedro CLI
- pytest - Pytest 替代 --verbose --verbose (-v -v)
- java - 条码的设备接近 LED
- python - 如何测试从 Django 应用异常发送的 Sentry 标签?
- python - 基于特定开始和结束事件的 Pyspark 拆分会话
- javascript - 我目前正在尝试创建一个 chrome 扩展(带有右键搜索的 ContextMenu)
- python - 并排绘制多个混淆矩阵
- sql-server - 如果有使用该用户运行的 SSIS 包,我从 Active Directory 重置 SQL Server 密码会发生什么
- javascript - JS - 满足条件时将对象从数组复制到新数组[编辑]
- firebase - Firestore,检查 valueChanges() 期间更改了哪些字段