简体   繁体   中英

Android Studio Sync Project with Gradle Files MISSING

I'm trying to find out what's wrong with my APK using the debug option, but the problem is that when I encountered the "please select the android sdk" error . I found several tutorials showing that the solution would only execute the "Sync Project with Gradle Files" option but it happens that this option does not appear anywhere, the only option that appears is "sync with file system" , I have looked everywhere, it is not the button that is missing, but the option in itself, I thought the problem would be something related to my gradle but it is ok when I check your version at the prompt.

update your gradle or make your gradle online in syncing time. also you check your sdk and downlod those you are missing please up wote

This specific problem drove me crazy for a while before I figured it out and I came straight here. If you go the attempt to add a configuration and it says there are no modules to pick from then this is likely your problem: When Importing the program from version control or when writing it the settings.gradle file either didn't import, wasn't written, or got placed in the wrong place.

This also means you don't have a module formally set.

Go to file --> new --> import module

A screen will pop up that is labeled "Import module from source".

In it will have a box in which you can either fill in a source path or browse to find one.

Either way works, but you need to fill in your path to the master in the program. This will be easy to recognize because usually it is the folder that contains "app", "gradle", and similar folders and files. It will also usually not contain the .idea folder.

There are usually two settings.gradle files and it also happens to be the one that contains the other settings.gradle file.

When browsing in the "import module from source" option select that master as your module.

It will then automatically resync and add the option to "sync project with gradle files"

The reason it doesn't have the option right now is because it doesn't know which files in the project to sync with which gradle files. That is why you must import the module from the program's on master. It doesn't know which part of the program it is supposed to by syncing with.

It fixed the problem right away for me. Good luck.

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