Android Studio“扫描要索引的文件” [英] Android Studio "Scanning For Files To Index"

查看:452
本文介绍了Android Studio“扫描要索引的文件”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在Android Studio中实现以下项目结构

I am trying to achieve the following project structure in Android Studio

project/
    projectA/
    projectB/

其中 projectA 是应用程序由我已重命名的Android Studio创建的模块, projectB 是我希望在应用程序中依赖的Kotlin项目。我可以让项目在我的项目中作为模块正确显示,但无论我尝试什么,只要我将 projectB 添加到我的Android Studio项目中,它似乎就会卡住在搜索要索引的文件的循环中。当我查看文件时,它总是只循环浏览相同的2-3个文件。它们总是META-INF文件,但并不总是相同的。

Where projectA is an "app" module created by Android Studio which I have renamed, and projectB is a Kotlin project I wish to depend on in the app. I can get the projects to appear correctly as modules in my project however no matter what I try, as soon as I add projectB to my Android Studio project, it seems to get stuck in a loop "searching for files to index". When I look at the files it is always just looping through the same 2-3 files. They are always META-INF files but not always the same ones.

如何在不遇到此错误的情况下成功将模块添加到Android Studio项目或如何设置从一开始我的项目实现这个结构?

How do I successfully add a module to an Android Studio Project without hitting this error or how can I set out my project from the start to achieve this structure?

谢谢。

推荐答案

问题似乎是我在我的 project / projectB 目录下有一个 gradle / 目录因为该项目最初是由IntelliJ创建的独立项目。删除修复此问题。

The problem seemed to be that I had a gradle/ directory under my project/projectB directory that was there because the project was originally created as a standalone project by IntelliJ. Deleting that fixed the issue.

这篇关于Android Studio“扫描要索引的文件”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆