小编Lak*_*hna的帖子

如何在 VSCode 中为特定项目禁用 prettier?

我需要为特定项目关闭 Prettier。为了做到这一点,我创建了一个.prettierrcwith{}但它不起作用。

我可以在 vscode 上停用 prettier 插件,因为我们还有其他项目,需要将其添加到插件列表中。

我也在项目中使用了ESLint。

visual-studio-code

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

Visual Studio Code 应用中心:Android Gradle 插件需要 Java 11 才能运行。您当前使用的是 Java 1.8

我使用 Visual Studio Code 应用程序中心来构建我的 Android 应用程序,之后一切正常,但现在构建失败,出现以下异常。我该如何解决这个问题?

FAILURE: Build failed with an exception.

* Where:
Build file '/Users/runner/work/1/s/app/build.gradle' line: 1

* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
   > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
     You can try some of the following options:
       - changing the IDE settings.
       - changing the JAVA_HOME environment variable.
       - changing `org.gradle.java.home` in `gradle.properties`.

* Try:
Run with --stacktrace …
Run Code Online (Sandbox Code Playgroud)

android visual-studio-app-center

27
推荐指数
1
解决办法
8509
查看次数

无法使用 Xcode 15.0 下载并安装 iOS 17.0 Simulator 运行时

我尝试在Xcode 15.0中安装iOS 17.0 模拟器时遇到问题。问题是当Xcode更新到版本15时,现在我之前下载的所有模拟器都消失了。尽管我之前已经安装了 iOS 15.0,但它似乎无法运行,并且收到一条错误消息,指出我需要 iOS 17。然后当我尝试从 xcode 下载此版本时。我最终得到了这个错误消息。

在此输入图像描述

xcode ios ios-simulator

25
推荐指数
3
解决办法
3万
查看次数

此编译器不支持 API 级别 31。请使用 30 或更早的 API 级别

我将现有的 android 项目升级到 API 级别 31。我使用 Java 作为语言。我改变了build.gradle

compileSdkVersion 31
defaultConfig {
    applicationId 'com.app.app'
    minSdkVersion 16
    targetSdkVersion 31
    versionCode 91
    versionName '4.0.1'
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    multiDexEnabled true
}
Run Code Online (Sandbox Code Playgroud)

但我无法使用 AVD 或真实设备调试该应用程序。我收到这个错误。

> Task :app:mergeProjectDexDebug
AGPBI: {"kind":"warning","text":"An API level of 31 is not supported by this compiler. Please use an API level of 30 or earlier","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"warning","text":"An API level of 31 is not supported by this compiler. Please use an API level of 30 or earlier","sources":[{}],"tool":"D8"}
AGPBI: {"kind":"warning","text":"An API level of …
Run Code Online (Sandbox Code Playgroud)

android android-studio

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

Expo custom native: CocoaPods could not find compatible versions for pod "ExpoAdapterGoogleSignIn"

I have an expo project that has android and ios separate projects, which I have used @react-native-google-signin, I want to run this app with my ios emulator. Below is the error that I got when I runs pod install

[!] CocoaPods could not find compatible versions for pod "ExpoAdapterGoogleSignIn":
  In Podfile:
    ExpoAdapterGoogleSignIn (from `../node_modules/@react-native-google-signin/google-signin/ios`)

Specs satisfying the `ExpoAdapterGoogleSignIn (from `../node_modules/@react-native-google-signin/google-signin/ios`)` dependency were found, but they required a higher minimum deployment target.
Run Code Online (Sandbox Code Playgroud)

Pod file:

require File.join(File.dirname(`node --print "require.resolve('expo/package.json')"`), "scripts/autolinking")
require …
Run Code Online (Sandbox Code Playgroud)

react-native google-signin expo

2
推荐指数
1
解决办法
2030
查看次数

Firebase Auth 电话 OTP 不会在 Android 中自动读取

我正在使用最新的 firebase sdk 进行身份验证,但 otp 自动填充不起作用。OTP 短信已成功接收,当我手动输入时,它工作正常,没有任何问题。但我需要自动获取 OTP,无需用户参与。

我的代码:

    mAuth = FirebaseAuth.getInstance();
    editText = findViewById(R.id.sixdigit);
    mTextViewCountDown = findViewById(R.id.text_view_countdown);

    progress = new ProgressDialog(GVerifyotpActivity.this);
    progress.setMessage("Waiting....");
    progress.setProgressStyle(ProgressDialog.STYLE_SPINNER);

    String phonenumber = getIntent().getStringExtra("phonenumber");
    sendVerificationCode(phonenumber);

    findViewById(R.id.pnext).setOnClickListener(v -> {
        String code = editText.getText().toString().trim();
        if (code.isEmpty() || code.length() < 6) {
            editText.setError("Enter code...");
            editText.requestFocus();
            return;
        }
        verifyCode(code);
    });

    mButtonStartPause = findViewById(R.id.button_start_pause);
    mButtonStartPause.setOnClickListener(view -> {
        resetTimer();
        startTimer();
        resendVerificationCode(phonenumber, mResendToken);
    });
}

private void verifyCode(String code) {
    PhoneAuthCredential credential = PhoneAuthProvider.getCredential(verificationId, code);
    signInWithCredential(credential);
    if(progress!=null && !progress.isShowing()) {
        progress.show();
    }
} …
Run Code Online (Sandbox Code Playgroud)

android firebase firebase-authentication

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