【发布时间】:2017-08-23 04:18:10
【问题描述】:
mAuth!!.createUserWithEmailAndPassword(email,password)
.addOnCompleteListener(this){ task ->
if (task.isSuccessful){
Toast.makeText(applicationContext,"Successful login",Toast.LENGTH_LONG).show()
var currentUser =mAuth!!.currentUser
//save in database
if(currentUser!=null) {
myRef.child("Users").child(SplitString(currentUser.email.toString())).child("Request").setValue(currentUser.uid)
}
LoadMain()
}else
{
Toast.makeText(applicationContext,"fail login",Toast.LENGTH_LONG).show()
}
}
我收到“包'com.example.package'的开发人员警告无法在频道'null'上发布通知,请参阅日志了解更多详细信息”
在日志中
DynamiteModule: Local module descriptor class for com.google.firebase.auth not found.
GooglePlayServicesUtil: Google Play services out of date. Requires 11020000 but found 10932470
Notification: Use of stream types is deprecated for operations other than volume control
Notification: See the documentation of setSound() for what to use instead with android.media.AudioAttributes to qualify your playback use case
我有
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:26.0.1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.google.firebase:firebase-core:11.2.0'
compile 'com.google.firebase:firebase-auth:11.2.0'
compile 'com.google.firebase:firebase-database:11.2.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.0'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.0'
}
在 build.gradle 中
我一直在看这个https://developer.android.com/guide/topics/ui/notifiers/notifications.html#ManageChannels,但我不知道如何处理这个
【问题讨论】:
-
您发布的代码与通知无关。
标签: android firebase firebase-authentication kotlin