实现即时应用程序并将项目划分为模块后,我遇到了gradle sync错误。消息和构建视图中没有消息,因此我检查了idea.log
并找到
库名称不匹配:com.android.support:transition:27.1.1@aar与Gradle:com.android.support:transition-27.1.1 java.lang.Exception:库名称不匹配:com.android.support:transition:27.1.1@aar与Gradle:com.android.support:transition-27.1.1 在com.android.tools.idea.res.aar.AarResourceRepositoryCache.get(AarResourceRepositoryCache.java:71) 在com.android.tools.idea.res.AppResourceRepository.computeLibraries(AppResourceRepository.java:130) 在com.android.tools.idea.res.AppResourceRepository.updateRoots(AppResourceRepository.java:196) 在com.android.tools.idea.res.ProjectResourceRepositoryRootListener.moduleRootsChanged(ProjectResourceRepositoryRootListener.java:98) 在com.android.tools.idea.res.ProjectResourceRepositoryRootListener.access $ 100(ProjectResourceRepositoryRootListener.java:36) 在com.android.tools.idea.res.ProjectResourceRepositoryRootListener $ 2.performInDumbMode(ProjectResourceRepositoryRootListener.java:65) 在com.intellij.openapi.project.DumbServiceImpl.lambda $ runSingleTask $ 9(DumbServiceImpl.java:541) 在com.intellij.openapi.progress.impl.CoreProgressManager.lambda $ runProcess $ 1(CoreProgressManager.java:157) 在com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580) 在com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525) 在com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85) 在com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144) 在com.intellij.openapi.project.DumbServiceImpl.runSingleTask(DumbServiceImpl.java:534) 在com.intellij.openapi.project.DumbServiceImpl.runBackgroundProcess(DumbServiceImpl.java:517) 在com.intellij.openapi.project.DumbServiceImpl.access $ 400(DumbServiceImpl.java:51) 在com.intellij.openapi.project.DumbServiceImpl $ 4.run(DumbServiceImpl.java:474) 在com.intellij.openapi.progress.impl.CoreProgressManager $ TaskRunnable.run(CoreProgressManager.java:750) 在com.intellij.openapi.progress.impl.CoreProgressManager.lambda $ runProcess $ 1(CoreProgressManager.java:157) 在com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:580) 在com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:525) 在com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:85) 在com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:144) 在com.intellij.openapi.progress.impl.CoreProgressManager $ 4.run(CoreProgressManager.java:395) 在com.intellij.openapi.application.impl.ApplicationImpl $ 1.run(ApplicationImpl.java:305) 在java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511) 在java.util.concurrent.FutureTask.run(FutureTask.java:266) 在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 在java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:617) 在java.lang.Thread.run(Thread.java:745)
我使用的是Android Studio 3.2,但在稳定版本上却存在相同的同步错误。我仍然可以构建apk和运行应用程序,但是由于同步错误,我看不到布局预览。有什么建议么?