Не удалось разрешить: com.firbaseui: firebase-ui-database: 3.2.2 в приложении для видеовызовов - PullRequest
0 голосов
/ 27 апреля 2020

Я создаю приложение для видеовызовов на android, используя java язык, на котором я получаю ошибку в зависимостях. Ниже написан java код, xml файлы и все зависимости написаны. Я не знаю, почему я получаю ошибка. Я определил все. Я гуглил это много для того же

MainActivity. java

package com.example.dekho;

import androidx.appcompat.app.AppCompatActivity;

import android.app.ProgressDialog;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.RelativeLayout;
import android.widget.Toast;

import com.google.firebase.FirebaseApp;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.PhoneAuthProvider;
import com.hbb20.CountryCodePicker;
import java.util.concurrent.TimeUnit;





import java.util.concurrent.TimeUnit;

public class MainActivity extends AppCompatActivity {

    private CountryCodePicker ccp;
    private EditText phoneText;
    private EditText codeText;
    private Button continueAndNextBtn;
    private String checker="",phoneNumber="";
    private RelativeLayout relativeLayout;
    private PhoneAuthProvider.OnVerificationStateChangedCallbacks mCallbacks;
    private FirebaseAuth mAuth;
    private String mVerificationId;
    private PhoneAuthProvider.ForceResendingToken mSendToken;
    private ProgressDialog loadingBar;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        ccp=findViewById(R.id.ccp);
        phoneText=findViewById(R.id.phoneText);
        codeText=findViewById(R.id.codeText);
        continueAndNextBtn=findViewById(R.id.continueNextButton);
        relativeLayout=findViewById(R.id.phoneAuth);
        FirebaseApp.initializeApp(this);
        continueAndNextBtn.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                PhoneAuthProvider.getInstance().verifyPhoneNumber(
                        phoneNumber,        // Phone number to verify
                        60,                 // Timeout duration
                        TimeUnit.SECONDS,   // Unit of timeout
                        MainActivity.this,               // Uses the <ActivityName>.this instead of just "this" Activity (for callback binding)
                        mCallbacks);        // OnVerificationStateChangedCallbacks


            }
        });






















    }
}

activity_main. xml

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@drawable/register"
    tools:context=".MainActivity">


    <TextView
        android:id="@+id/textview1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_marginTop="260dp">
    </TextView>


    <RelativeLayout
        android:id="@+id/phoneAuth"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/textview1"
        android:layout_marginLeft="25dp"
        android:layout_marginRight="25dp"
        android:padding="8dp">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical">

            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Phone Number:"
                android:textStyle="bold"
                android:textColor="@android:color/white"
                android:textSize="18sp" />

            <LinearLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:gravity="center_vertical">

                <com.hbb20.CountryCodePicker
                    android:id="@+id/ccp"
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:background="@android:color/white"
                    app:ccp_defaultNameCode="IN" />

                <EditText
                    android:id="@+id/phoneText"
                    android:layout_width="match_parent"
                    android:layout_height="60dp"
                    android:textColor="@android:color/white"
                    android:textColorHint="@android:color/darker_gray"
                    android:inputType="phone"
                    android:singleLine="true"
                    android:backgroundTint="@android:color/white"/>
            </LinearLayout>
        </LinearLayout>
    </RelativeLayout>



    <EditText
        android:id="@+id/codeText"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:layout_margin="25dp"
        android:hint="Write you code here..."
        android:textColor="@android:color/white"
        android:textColorHint="@android:color/white"
        android:inputType="phone"
        android:singleLine="true"
        android:layout_below="@+id/phoneAuth"
        android:drawableLeft="@drawable/password"
        android:drawableTint="@android:color/white"
        android:backgroundTint="@android:color/white"
        android:visibility="gone"/>

    <Button
        android:id="@+id/continueNextButton"
        android:layout_width="120dp"
        android:layout_height="40dp"
        android:layout_below="@+id/codeText"
        android:layout_centerHorizontal="true"
        android:text="Continue"
        android:textAllCaps="false"
        android:layout_marginTop="6dp"
        android:textSize="15dp"
        android:background="@color/colorPrimary"
        android:textColor="@android:color/white"/>


</RelativeLayout>

уровень проекта зависимости

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

    repositories {
        google()
        jcenter()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.2'
        classpath 'com.google.gms:google-services:4.2.0'



        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()

    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

зависимости уровня приложения

apply plugin: 'com.android.application'

    android {
        compileSdkVersion 29
        buildToolsVersion "29.0.3"

        defaultConfig {
            applicationId "com.example.dekho"
            minSdkVersion 16
            targetSdkVersion 29
            versionCode 1
            versionName "1.0"

            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }

        buildTypes {
            release {
                minifyEnabled false
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
        }

    }

    dependencies {



  implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.hbb20:ccp:2.1.9'
    implementation 'com.google.firebase:firebase-core:11.8.0'
    implementation 'com.google.firebase:firebasapp level dependenciee-database:11.8.0'
    implementation 'com.google.firebase:firebase-storage:11.8.0'
    implementation 'com.google.firebase:firebase-auth:11.8.0'
    implementation 'com.firbaseui:firebase-ui-database:3.2.2'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'






    }

ошибка

ERROR: Failed to resolve: com.firbaseui:firebase-ui-database:3.2.2
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...