使用Firebase Auth Android时遇到问题

时间:2016-06-19 03:45:00

标签: android firebase

我启动了我的应用程序,当我点击“分享”按钮时,我的应用程序停止了工作,错误显示如下:

settings

这是LocationShareReceiver包含Firebase错误:

Caused by: java.net.URISyntaxException: Invalid scheme specified: https:/findingyou2.firebaseio.com/
                                                                      at com.firebase.client.utilities.Utilities.parseUrl(Utilities.java:23)
                                                                      at com.firebase.client.Firebase.<init>(Firebase.java:155) 
                                                                      at com.robby.findingyou.LocationShareReceiver.SetAlarm(LocationShareReceiver.java:116) 
                                                                      at com.robby.findingyou.LocationServices.onStartCommand(LocationServices.java:27) 

这个错误也来自LocationServices.java:

app = Application.instance();
    Log.v("application", app.toString());
    if(app != null) {
        app.setSharingStatus(true, context);
    }
    Firebase.setAndroidContext(context);
    mFirebaseRef = new Firebase("https:/findingyou2.firebaseio.com/");
    if(mFirebaseRef != null) {
        authData = mFirebaseRef.getAuth();
        if(authData != null)
            mUserID = authData.getUid();
    }
    if(mFirebaseRef != null && authData != null) {
        mFirebaseRef.child("users").child(mUserID).child("expiration").setValue(expiration);
    }

那个错误是因为什么?请帮帮我这个

1 个答案:

答案 0 :(得分:0)

URISyntaxException,因为您的网址格式错误

只需替换

https:/findingyou2.firebaseio.com/

https://findingyou2.firebaseio.com/