我在 Android Studio 中尝试使用 mapbox 时遇到这个问题
无法解决:com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0
问题是什么?
我的 build.gradle 依赖项
dependencies {
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.mapbox.mapboxsdk:mapbox-android-sdk:9.5.0'
}
Run Code Online (Sandbox Code Playgroud)
我的 build.gradle 项目
buildscript {
repositories {
google()
mavenCentral()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:4.0.1"
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://mapbox.bintray.com/mapbox' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试将 php 与 firebase 一起使用,但是当我尝试运行代码时出现此错误。
致命错误:未捕获错误:在第 10 行调用 C:\xampp\htdocs\table\includes\db.php 中未定义的方法 Kreait\Firebase\Factory::getDatabase()
db.php 文件:
<?php
require __DIR__.'/vendor/autoload.php';
use Kreait\Firebase\Factory;
use Kreait\Firebase\ServiceAccount;
$firebase = (new Factory())->withServiceAccount(__DIR__.'/bib-bayitback-firebase-adminsdk-lkch9-44e22401ec.json');
$database = $firebase->getDatabase();
?>
Run Code Online (Sandbox Code Playgroud)
我的composer.json 文件:
{
"require": {
"kreait/firebase-php": "5.0"
}
}
Run Code Online (Sandbox Code Playgroud)
我该如何解决它?