简体   繁体   中英

Language level inconsistency between Android Studio and WebStorm

Currently working with Google Backend APIs again and I tend to switch between Android Studio and WebStorm for proper syntax in both Java and HTML.

This works flawlessly, except for one thing. Each time I even look at the code through any of the mentioned programs, the modules language level is changed.

WebStorm changes it to 1.3, whereas Im working with 7 in Android Studio.

My question is as follows. Is it possible to either set the language level to be identical in both programs, or let it work with whatever language has been set? I dont want it to switch language level unless I specifically ask it to.

Thank you!

Are you opening the same project in both programs? If so then you should not be doing that.

WebStorm only supports one type of possible modules ( WebModule ) and does not know anything about JavaModule (or whatever it is) that Android Studio is using and therefore may drop/reset properties for such unknown modules.

Your option is to create separate projects (possibly by rearranging your code a bit) so that actual projects do not intersect (I mean -- project settings which are stored in .idea subfolder -- that's how IDE recognizes projects):

  • If all of your web code (the code that you are working with in WebStorm) is in separate subfolder .. then just create separate project in that subfolder.
  • Alternatively you may keep your project settings in another location manually (check https://youtrack.jetbrains.com/issue/WI-343 for details on how to) while still having the same folder as project root.

PS Yes -- separate projects mean that you will need to configure certain things twice in both projects.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM