找不到 com.android.support:support-v4:23.2.1 [英] Could not find com.android.support:support-v4:23.2.1

查看:85
本文介绍了找不到 com.android.support:support-v4:23.2.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当使用 react-native 0.28 及更高版本 (0.29, 0.30-rc) 时,在新的 react-native init 应用程序中执行 react-native run-android 时出现以下错误 项目.

When using react-native 0.28 and above (0.29, 0.30-rc), I get the following error when executing react-native run-android in a fresh react-native init app project.

Could not find com.android.support:support-v4:23.2.1.

我安装了最新的 android studio,甚至手动安装了过时的库.

I installed the newest android studio and even installed the obsolete library manually.

我做错了什么?谢谢!

推荐答案

为了完成 Tonithy 的回答 - .jar 可能还不够,你需要复制两个完整的目录,否则 gradle 会抱怨丢失的 .aar.在这种情况下,我认为那些是由 Android Studio 安装的:{USER}/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/23.2.1/

To complete Tonithy's answer - the .jar may not be enough, you need to copy two whole directories, otherwise gradle will complain for the missing .aar. In this case, I think that those were installed by Android Studio: {USER}/Library/Android/sdk/extras/android/m2repository/com/android/support/support-v4/23.2.1/

并且不要忘记依赖项:{USER}/Library/Android/sdk/extras/android/m2repository/com/android/support/support-annotations/23.2.1/

我在升级到 react-native 0.30 时遇到了完全相同的问题,解决了这个问题.

I had exactly the same problem while upgrading to react-native 0.30, that solved the issue.

这篇关于找不到 com.android.support:support-v4:23.2.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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