import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import code.studio.v.R;
import code.studio.v.volley.RequestQueue;
Android studio is showing an error . Can not resolve symbol volley. I have cloned volley and added it as a module. My package name is code.studio.v
The following is my build.gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "code.studio.v"
minSdkVersion 14
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:22.0.0'
}
the following is settings.gradle file .
include ':app', ':volley'
remove module dependencies and add library dependencies..using following steps
Finally sync gradle and run
If you have imported volley library as a separate module then you have to add dependency compile project(':yourVolleyModule') into your app's build.gradle. Now, Sync your gradle and i hope it will work