Android-Studio refresh project with build.gradle c

2019-01-25 05:22发布

how can I sync changes I made in the build.gradle into the project structure ( e.g. that AndroidStudio is recognizing the lib I added? Kind of like the "reimport all maven projects" for maven projects - just for a pure gradle project.

2条回答
混吃等死
2楼-- · 2019-01-25 06:00

I read somewhere that the "Synchronize" item on the module's context menu should update the IDE's settings based on the build.gradle file.

Ok, so in the latest version of Android Studio 0.1.3, they've added a Gradle project refresh button next to the other Android specific buttons in the toolbar. Make changes manually to the build.gradle files and settings.gradle and then click this button. It should configure and refresh your project settings based on the gradle files.

查看更多
你好瞎i
3楼-- · 2019-01-25 06:01

One thing that has worked for me was opening the Gradle panel on the right side of the editor (above "Maven Projects" and "Commander") and clicking the refresh button. That refreshed the module settings.

查看更多
登录 后发表回答