小编avc*_*vck的帖子

gradle - 无法在存储库容器上找到方法google()for arguments []

我的gradle文件

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

   repositories {
       google()
       jcenter()
   }
   dependencies {
       classpath 'com.android.tools.build:gradle:3.0.0'


       // NOTE: Do not place your application dependencies here; they belong
       // in the individual module build.gradle files
   }
}

 allprojects {
   repositories {
       google()
       jcenter()
   }
 }

 task clean(type: Delete) {
   delete rootProject.buildDir
  }
Run Code Online (Sandbox Code Playgroud)

android gradle android-studio android-gradle-plugin

54
推荐指数
0
解决办法
4万
查看次数

在 reactjs 和 nextjs 构造函数中获取引用错误:未定义 localstorage

我在 reactjs 中制作系统 jsonwebtoken 并使用 nextjs。当我在未定义 localStorage 的浏览器中运行代码时,我发现问题。

这是我在文件 AuthStudentContext.js 中的代码

import React from 'react'
import axios from 'axios'

const axiosReq = axios.create()
const AuthStudentContext = React.createContext()

export class AuthStudentContextProvider extends React.Component {

    constructor() {
        super()
        this.state = {
            students: [],
            student: localStorage.getItem('student') || {},
            token: localStorage.getItem('token') || "",
            isLoggedIn: (localStorage.getItem('student' == null)) ? false : true
        }
    }

    login = (credentials) => {
        return axiosReq.post("http://localhost:4000/api/login", credentials)
            .then(response => {
                const { token } = response.data
                localStorage.setItem("token", token)

                this.setState({
                    token, …
Run Code Online (Sandbox Code Playgroud)

javascript node.js reactjs next.js

9
推荐指数
4
解决办法
2万
查看次数

运行电子应用程序的最低系统要求是什么?

我正在决定构建本机桌面应用程序的选项.

我没有找到有关电子应用程序运行时的最低系统规格(OS/HW)的任何文档.你能帮我吗?

javascript native node.js system-requirements electron

6
推荐指数
1
解决办法
9902
查看次数

我的正则表达式出了什么问题?

preg_match('/[^0-9A-Za-z/._\-\s]/',$user)
Run Code Online (Sandbox Code Playgroud)

我正进入(状态

警告:preg_match()[function.preg-match]:未知的修饰符'.' 在第4行的F:\ wamp\www\distinctive\include\validate.inc.php中

为什么?

php regex preg-match

3
推荐指数
1
解决办法
107
查看次数