I am using firebase messaging for push notification. but after token not generated for specific users. this issue raised because of the onTokenRefresh method is depreciated in firebase messaging 11.2.0. 

If I replace the OnnewToken function and make below changes in the manifest, sync issue shows in the project structure and the log shows **"failed to resolve the com.google.firebase: firebase.messaging18.0.0**". How to update the firebase in the android.

[![enter image description here](https://i.stack.imgur.com/Wge7R.png)](https://i.stack.imgur.com/Wge7R.png)

[![enter image description here](https://i.stack.imgur.com/Wge7R.png)](https://i.stack.imgur.com/Wge7R.png) 

Build Gradle(Module: app)

dependencies
{
 implementation 'com.google.firebase:firebase-messaging:18.0.0'

}
Build.Gradle(Project: app)

```
dependencies {
    classpath 'com.android.tools.build:gradle:3.2.1'
    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath 'com.google.gms:google-services:3.1.0'
    }

```

public class UrbanFirebaseMessagingService extends FirebaseMessagingService implements OnBckgrdAsyncFinishListener {

```
private static final String TAG = "MyFirebaseMsgService";
@Override
public void onNewToken(String token) {
    Log.d(TAG, "Refreshed token: " + token);
}

@Override
public void onMessageReceived(RemoteMessage remoteMessage) {

}

```