我想在google playstore中有兩個不同的應用程序:「我的應用程序免費」和「我的應用程序專業版」。從我對這個問題所作的研究,對,最好的辦法是所以這裏使用productFlavors是我的build.gradle的摘錄:Android產品Flavor是否需要在Google開發控制檯中單獨應用?
buildTypes {
debug {
...
}
release {
...
}
}
productFlavors {
free {
...
}
pro {
applicationIdSuffix ".pro"
}
}
當我嘗試建立構建變量MYAPP-PRO釋放,我得到這個錯誤:
Error:Execution failed for task ':myapppro:processProReleaseGoogleServices'. > No matching client found for package name 'com.myapp.pro'
這是否意味着我必須添加在谷歌開發者控制檯專用MY-APP-Pro的應用程序,將有com.myapp.pro爲的applicationID?還是有其他的方法來解決用gradle構建錯誤?
。 –