我正在尝试使用React-native-google-signin插件进行 Google 登录,但它给了我一个 Developer_Error。我所做的与其文档中提到的完全相同。这是我的代码和步骤。
1.使用 npm i react-native-google-signin 安装 react-native-google-signin 插件。2.然后将它与 react-native 链接 react-native-google-signin 3. 之后我做了 build.gradle 文件的设置,因为他们在文档中提到了它。
ext {
buildToolsVersion = "27.0.3"
minSdkVersion = 16
compileSdkVersion = 27
targetSdkVersion = 26
supportLibVersion = "27.1.1"
googlePlayServicesAuthVersion = "15.0.1"
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:3.2.1'
}
allprojects {
repositories {
mavenLocal()
google()
maven {url "https://maven.google.com"}
jcenter()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
maven …Run Code Online (Sandbox Code Playgroud) 我想在ionic 4中提供警报控制器样式,这是我的演示代码,
async presentalert() {
const alert = await this.alertCtrl.create({
header: ' DO YOU WANT TO CANCEL',
message: 'DO YOU WANT TO CANCEL',
cssClass: 'alertCancel',
mode: 'ios',
buttons: [
{
text: 'NO',
role: 'cancel',
cssClass: 'alertButton',
handler: () => {
console.log('Confirm Cancel');
}
}, {
text: 'YES',
cssClass: 'alertButton',
handler: () => {
console.log('Confirm Okay');
}
}
]
})
await alert.present();
}
Run Code Online (Sandbox Code Playgroud)
我试图在global.scss中应用scss
.alertCancel{
--background: red;
}
.alertButton {
background-color: white !important;
}
Run Code Online (Sandbox Code Playgroud)
我已经尝试了所有可能的方法来在警报控制器中提供CSS,但是它无法正常工作,因此请帮助我,我被困在这里。