hi i'm trying to use OneSignal in android and i'm following this tutorial to install the SDK in Android Studio. here
i was able to compile the dependencies and sync the gradle file. but when i want to import com.onesignal.OneSignal;
it says: Cannot resolve symbol!
here is my dependencies in app.gradle file
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.onesignal:OneSignal:1.10.+@aar'
compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services-analytics:+'
compile project(':gson-2.2.2')
compile project(':java_websocket')
compile project(':signalr-client-sdk')
compile project(':signalr-client-sdk-android')
}
thing i done:
1. File > Synchronize
2. File > Invalidate Cashes and Restart
UPDATE:
i did the steps in a new project and that was ok! why i can't do it in this specific project?
EDIT:
whole build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "ir.irsapardaz.sina.gamev01"
manifestPlaceholders = [manifestApplicationId:"${applicationId}"]
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.onesignal:OneSignal:1.10.+@aar'
compile 'com.google.android.gms:play-services-gcm:+'
compile 'com.google.android.gms:play-services-analytics:+'
compile project(':gson-2.2.2')
compile project(':java_websocket')
compile project(':signalr-client-sdk')
compile project(':signalr-client-sdk-android')
}