将Firestore与JavaFX Maven应用程序集成时出错(IntelliJ Idea)

时间:2019-02-18 07:31:05

标签: java firebase google-cloud-firestore firebase-admin

发生异常“ com.google.cloud.firestore.FirestoreException:java.lang.IllegalStateException:找不到TLS ALPN提供程序;没有可用的netty-tcnative,Conscrypt或Jetty NPN / ALPN”

关于代码,

InputStream serviceAccount = new FileInputStream("json file path");
GoogleCredentials credentials = GoogleCredentials.fromStream(serviceAccount);
FirebaseOptions options = new FirebaseOptions.Builder()
    .setCredentials(credentials)
    .build();
FirebaseApp.initializeApp(options);
Firestore db = FirestoreClient.getFirestore();

我的pom.xml:

    <dependencies>
       <dependency>
           <groupId>com.google.firebase</groupId>
           <artifactId>firebase-admin</artifactId>
           <version>6.7.0</version>
       </dependency>
    </dependencies>

0 个答案:

没有答案