DzmitrySlutskiy / EpamTraining2019

28 stars 20 forks source link

hw_24.03_gradle @egorikftp #186

Closed DoTheMonkeyBusiness closed 5 years ago

DoTheMonkeyBusiness commented 5 years ago

@egorikftp

https://github.com/DoTheMonkeyBusiness/EpamAndroid/pull/7

When i make a commit android studio show errors in unselected build variants.

Screenshot_2

ilya-shknaj commented 5 years ago

@DoTheMonkeyBusiness please provide more steps/branch etc. I've checkout hw_24.03_gradle branch and select fullDebug flavor. Compilation is success.

What doest it mean 'When I make a commit' and how it related with provided screenshoot? For resolving issue you can try to do Build->Clean project if not resolve issue also try File->Invalidate caches/Restart

DoTheMonkeyBusiness commented 5 years ago

@ilya-shknaj When I choose the demo version ide stops reading xml in the full version, it does not affect the compilation, but when I make a commit the ide starts to swear.

image

ilya-shknaj commented 5 years ago

I'm right that you try to commit your changes into git over AndroidStudio and get compilation error from first screen ?

Issue which i found. Looks like you try to use submodule and android studio highlight that something wrong with git

Screen Shot 2019-04-06 at 00 09 14 Screen Shot 2019-04-06 at 00 09 19

Another issue The whole .idea folder should be in gitignore and should be removed from git. If you don't do any changes in some file, but git show you that something changed, usually it mean that you commit something, that shouldn't commit

Screen Shot 2019-04-06 at 00 12 23

About flavor. If you choose full flavor it's ok that layout from demo flavor is not compiling. For android studio this layout becomes as just text file. What's a bit strange that layout highlights some error. But anyway, as I mentioned before, it's not affect compilation of full flavor.

Please provide screen where you try to commit something

DoTheMonkeyBusiness commented 5 years ago

@ilya-shknaj

image

image

image

ilya-shknaj commented 5 years ago

@DoTheMonkeyBusiness about error during commit. I see in screenshoot that you select flavor demo, but do some change in flavor full.

AndroidStudio check all changed files and highlight you that this code is not compiling. It's ok. If you change flavor to full, you will not see errors like on first screen.

By the way, doing some changes in another flavor without don't selecting it, could be pretty risky, I don't recommend to you do changes this way in not selected flavor.

egorikftp commented 5 years ago

@DoTheMonkeyBusiness Did you fix problems which were described by Ilya?

DoTheMonkeyBusiness commented 5 years ago

@egorikftp yes

egorikftp commented 5 years ago

@DoTheMonkeyBusiness Done)