错误:神器的支持,v4.jar(com.android.support:support-v4:21.0.3)'未找到。 Android的工作室1.0.2神器、未找到、错误、工作室

2023-09-07 18:01:48 作者:小眼睛男神*

我做了一个新的Andr​​oid 1.0.2工作室的安装。打开我的第一个现有的Andr​​oid项目时,遇到了以下错误:

I did a new install of Android Studio 1.0.2. Getting the following error when opening my first existing android project:

摇篮所有MyApplication 项目刷新失败

Error:Artifact 'support-v4.jar (com.android.support:support-v4:21.0.3)' not found.

搜索在以下位置: file:/C:/Users/Ntokozo/AppData/Local/Android/sdk/extras/android/m2repository/com/android/support/support-v4/21.0.3/support-v4-21.0.3.jar

如果我定位到搜索的位置我发现了两个jar文件分别是:支持-v4-21.0.3-sources.jar和支持,v4-21.0.3-javadoc.jar

And if I navigate to that searched location I found two jar files which are: support-v4-21.0.3-sources.jar and support-v4-21.0.3-javadoc.jar

下面是我的build.gradle文件:

Here is my build.gradle file:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.0.0'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

在应用程序文件夹摇篮文件:

Gradle file under App folder:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.example.ntokozo.myapplication"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.android.support:support-v4:21.0.3'
}

感谢你在前进,请裸记住的,我是一个新手的反应,我可能不知道的先进功能。

Thank you in advance, please bare in mind in responses that I'm a novice and I might not know advanced features.

推荐答案

重新安装Windows操作系统和一个新的Andr​​oid Studio安装问题就消失了之后。我不知道是什么问题在第一。

After re-installing windows OS and a new Android Studio setup the problem disappeared. I don't know what was the problem at first.