我在新的Android工作室版本中得到以下错误基本的hello世界也没有建立在gradle中.云请你帮忙.
这是我在新的android studio版本中遇到的错误:

我的gradle文件如下
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "payments.com.java.payments"
minSdkVersion 17
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0-rc01'
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Run Code Online (Sandbox Code Playgroud)
这是我得到的日志
无法解析':app @ debug/compileClasspath'的依赖关系:无法解析com.android.support:appcompat-v7:28.0.0-rc01.打开文件显示细节
无法解析':app @ debug/compileClasspath'的依赖关系:无法解析com.android.support.constraint:constraint-layout:1.1.2.打开文件显示细节
无法解析':app @ debugAndroidTest/compileClasspath'的依赖关系:无法解析com.android.support.test:runner:1.0.2.打开文件显示细节
无法解析':app @ debugAndroidTest/compileClasspath'的依赖关系:无法解析com.android.support.test.espresso:espresso-core:3.0.2.打开文件显示细节
无法解析':app @ debugAndroidTest/compileClasspath'的依赖关系:无法解析com.android.support:appcompat-v7:28.0.0-rc01.打开文件显示细节
无法解析':app @ debugAndroidTest/compileClasspath'的依赖关系:无法解析com.android.support.constraint:constraint-layout:1.1.2.打开文件显示细节
无法解析':app @ debugUnitTest/compileClasspath'的依赖关系:无法解析com.android.support:appcompat-v7:28.0.0-rc01.打开文件显示细节
无法解析':app @ …
我正在尝试连接到 mongodb,但出现以下错误,请帮忙
var mongo = require('mongodb').MongoClient;
mongo.connect('mongodb://usernamexyz:passwordxyz@hostmxy-mw-e6-u1238.nam.nsroot.net:47017/sampleDB?replicaSet=NAME_2436&readPreference=primary&authSource=admin&w=1', { useNewUrlParser: true, useUnifiedTopology: true })
.then(() => console.log("Mongodb connected"))
.catch(err => console.log(err));
Run Code Online (Sandbox Code Playgroud)
我得到的错误如下
MongoServerSelectionError: connection <monitor> to 155.30.360.129:37017 closed
at Timeout._onTimeout (C:\Fintech\NodeFirstApp\node_modules\mongodb\lib\core\sdam\topology.js:448:30)
at listOnTimeout (internal/timers.js:531:17)
at processTimers (internal/timers.js:475:7) {
name: 'MongoServerSelectionError',
reason: TopologyDescription {
type: 'ReplicaSetNoPrimary',
setName: null,
maxSetVersion: null,
maxElectionId: null,
servers: Map {
'hostmxy-mw-e6-u1238.nam.nsroot.net:47017' => [ServerDescription]
},
stale: false,
compatible: true,
compatibilityError: null,
logicalSessionTimeoutMinutes: null,
heartbeatFrequencyMS: 10000,
localThresholdMS: 15,
commonWireVersion: null
},
[Symbol(mongoErrorContextSymbol)]: {}
}
Run Code Online (Sandbox Code Playgroud)