I am using firebase to read data attached with dynamic link but but it showing the compile time error. My APP level gradle is given below.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "in.bitstreet.com.itdwallet"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Add the following two lines
renderscriptTargetApi 18
renderscriptSupportModeEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
aaptOptions {
cruncherEnabled = false
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':pinentry')
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:24.2.0'
compile 'com.android.support:support-v4:26.+'
compile 'com.google.code.gson:gson:2.2.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.squareup.retrofit2:converter-scalars:2.3.0'
compile 'org.apache.directory.studio:org.apache.commons.codec:1.8'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'jp.wasabeef:blurry:2.1.1'
compile 'com.google.firebase:firebase-core:9.4.0'
compile 'com.google.firebase:firebase-messaging:9.4.0'
compile 'com.google.firebase:firebase-invites:9.4.0'
compile 'com.google.android.gms:play-services-appinvite:9.4.0'
testCompile 'junit:junit:4.12'
}
//for fire base pushnotification
apply plugin: 'com.google.gms.google-services'
and the code which i am adding the below code inside onCreate() in my SplashscreenActivity.java , It is showing error Can not resolve symbol FirebaseDynamicLinks and PendingDynamicLinkData
FirebaseDynamicLinks.getInstance()
.getDynamicLink(getIntent())
.addOnSuccessListener(this, new OnSuccessListener<PendingDynamicLinkData>() {
@Override
public void onSuccess(PendingDynamicLinkData pendingDynamicLinkData) {
// Get deep link from result (may be null if no link is found)
Uri deepLink = null;
if (pendingDynamicLinkData != null) {
deepLink = pendingDynamicLinkData.getLink();
String data = deepLink.getQueryParameter("data");
}
}
})
.addOnFailureListener(this, new OnFailureListener() {
@Override
public void onFailure(@NonNull Exception e) {
Log.w(TAG, "getDynamicLink:onFailure", e);
}
});
Please guide me.