Import Android volley to Android Studio

前端 未结 17 2194
孤街浪徒
孤街浪徒 2020-12-07 11:33

I wanna use the google\'s volley library

I am using Android Studio and I know how to add .jar libraries.

But I could not create a .jar library with the voll

17条回答
  •  星月不相逢
    2020-12-07 12:24

    The "compile project(':volley')" line was giving me this error:

    Error:Execution failed for task ':volley:processDebugResources'. > com.android.ide.common.process.ProcessException: Failed to execute aapt

    It was caused because the compileSdk and buildTools versions of module volley were currently on"22" and "22.0.1" and I my project was working with newer ones ("24" and "24.0.1").

    SOLUTION:

    Open your build.gradle (Module:volley) file and change the version of "compileSdk" and "buildTools", for example I changed this:

    android {
        compileSdkVersion 22
        buildToolsVersion = '22.0.1'
    }
    

    for this:

    android {
        compileSdkVersion 24
        buildToolsVersion = '24.0.1'
    }
    

    You should no longer have this error, I hope it helps:)

提交回复
热议问题