2017-02-02 23 views
-2

私は会社でアンドロイドの開発のためにアンドロイドスタジオを使用しています。ここで私はgradleを使用して依存関係を追加していますが、すべてのgradle依存関係でエラーを解決できませんでした。これの背後にある問題。アンドロイドスタジオで問題を解決できませんでした

ありがとうございます。

Error:(24, 13) Failed to resolve: com.android.volley:volley:1.0.0 Show in File
Show in Project Structure dialog

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "25.0.1" 
    defaultConfig { 
     applicationId "calkinsmedia.com.myapplication" 
     minSdkVersion 15 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    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:25.1.0' 
    compile 'com.android.volley:volley:1.0.0' 
} 

これは私のプロジェクトレベルのbuild.gradleです:

// Top-level build file where you can add configuration options common to all sub-projects/modules. 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.2.2' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 
+1

'build.gradle' –

+0

エラーとポストlogcat:(24、13)が解決に失敗しました:com.android.volley:ボレー:@IntelliJAmiyaは – DkThakur

+1

編集あなたの質問に'compile 'を追加してください。com.android.volley:volley:1.0.0'' –

答えて

1

はい、私はsolution.Whatが問題だった、私のシステムでAndroidのスタジオを防止、ウイルス対策があります依存関係をダウンロードしてください。私はすべての正常に動作するウイルス対策をオフにしました。

関連する問題