0
Android 프로젝트에는 2 가지 제품 맛이 있습니다.Android의 제품 맛
나는 코드베이스를 사용하려면, 그리고 내가 좋아하는 몇 가지 코드가 있습니다
if (BuildConfig.FLAVOR.equals("firstApp")) {
webButton = (FancyButton) findViewById(R.id.webButton);
webButton.setBackgroundColor(Util.getColorFromString(""));
webButton.setIconColor(Util.getColorFromString("#005126"));
}
먼저 앱이 레이아웃을 가지고 있으며,이 아이디 webButton있는 버튼이 있습니다.
두 번째 앱의 레이아웃에서는 webButton이 필요하지 않으므로 제거했습니다.
두 번째 앱에는 버튼이 없으므로 위의 코드는 오류가 발생합니다.
어떻게해야합니까?