Java 无法解析配置 ':app:_debugApkCopy' 的所有依赖项

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/41387085/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-11 23:21:16  来源:igfitidea点击:

Could not resolve all dependencies for configuration ':app:_debugApkCopy'

javaandroidandroid-studiosdk

提问by Yaron Goldshtein

I'm new in Android Studio, I've tried to write to fire base and when android offered me something I accepted and then everything stop working and he didn't recognize any object.

我是 Android Studio 的新手,我试图写信给 fire base,当 android 向我提供一些东西时,我接受了,然后一切都停止了,他不认识任何对象。

I get this error:

我收到此错误:

**Error: A problem occurred configuring project ':app'.**
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
   > Could not find com.google.android.gms:play-services-appindexing:10.0.1.

I've already updated ths SDK and I think my dependencies are fine. Any other suggestion?

我已经更新了 ths SDK,我认为我的依赖关系很好。还有什么建议吗?

edit: i find out that it happen after i copied code from somewhere and click on "alt + enter" and then accidentally click on some option whit "...api..." (i can't restore that).

编辑:我发现它发生在我从某处复制代码并单击“alt + enter”后,然后不小心单击了“...api ...”的某个选项(我无法恢复)。

I copy the code to other computer and now it's working.

我将代码复制到另一台计算机,现在它可以工作了。

Dependencies: dependencies

依赖项: 依赖

采纳答案by chathura rupasinghe

Try removing your dependencies and rebuilding the app again. Try Clean and rebuild.

尝试删除您的依赖项并再次重建应用程序。尝试清理并重建。

回答by Yash Jain

Removing it fixed my problem. So simply remove "compile 'com.google.android.gms:play-services-appindexing:10.2.6'" from your project. Build. And run. Should be fine then

删除它解决了我的问题。因此,只需从您的项目中删除“compile 'com.google.android.gms:play-services-appindexing:10.2.6'”。建造。并运行。那应该没问题

回答by Inessa Pokromkina

I got the same problem.

我遇到了同样的问题。

react-native upgrade

Find the solution here: https://stackoverflow.com/a/34995870/5834287- and it start works!

在这里找到解决方案:https: //stackoverflow.com/a/34995870/5834287- 它开始工作了!

回答by Tuan Nguyen

Remove node_module and run npm install

删除 node_module 并运行 npm install