简体   繁体   中英

Android Studio Layout Editor not working after Clone

I am having some issue with Android Studio which is kind Of annoying. Maybe you can help me out.

I did a git commit and push in a Github repo of mine which shows an example of how to work with Fragments.

I would like to build a new example in a new android studio project based on this repo, so i did a clone of this project in a new one with the wizard Android studio avails for this purpose.

It is not the first time that I do it and, meanwhile the clone works properly, Layout design tab for layout edition does not work.

I 've tried Clean and rebuild project but no luck :S

I am working with targetSDKVersion 26 and minSDKVersion 25.

I 've solved it mySelf. If someone encounters with this same problem, i will explain what i did.

I checked out the event Log and saw:

Error Loading Project: Cannot load module <PreviousProjectName>

If you expand the details, you may see a link for delete the old module. Click it.

Then i opened the build.gradle for the module app and changed the applicationID which was the same as the old project. Then I saved my build.gradle for the module and resynced my project:

看到?

After syncing and indexing and building... etc, the layout editor started working as usual. ;D

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