почему мое приложение не может использовать класс FirebaseVisionLabelDetectorOptions - PullRequest
0 голосов
/ 29 мая 2020

Я пытался создать объект из класса FirebaseVisionLabelDetectorOptions, но мое приложение не импортирует его Я получил эту ошибку . А это мои зависимости

implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.firebase:firebase-analytics:17.2.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-database:19.3.0'
implementation 'com.wonderkiln:camerakit:0.13.1'
implementation 'com.github.d-max:spots-dialog:1.1@aar'
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.google.firebase:firebase-ml-vision:18.0.1'
implementation 'com.google.firebase:firebase-ml-vision-image-label-model:17.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-ml-vision:24.0.3'

1 Ответ

0 голосов
/ 04 июня 2020

Вы используете API Cloud Landmarks , поэтому вам понадобится класс Cloud Options

FirebaseVisionCloudDetectorOptions options =
    new FirebaseVisionCloudDetectorOptions.Builder()
            .setModelType(FirebaseVisionCloudDetectorOptions.LATEST_MODEL)
            .setMaxResults(15)
            .build();

API-интерфейсы на основе облака работают иначе, чем API-интерфейсы на устройстве, поэтому параметры будут немного отличается.

...