Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.75.2版本的react-native跑不起来 #867

Open
gaoxinxiao opened this issue Aug 25, 2024 · 3 comments
Open

0.75.2版本的react-native跑不起来 #867

gaoxinxiao opened this issue Aug 25, 2024 · 3 comments

Comments

@gaoxinxiao
Copy link

AILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':gradle-plugin:shared:compileKotlin'.

Could not resolve all files for configuration ':gradle-plugin:shared:compileClasspath'.
Could not resolve com.google.code.gson:gson:2.8.9.
Required by:
project :gradle-plugin:shared
> Could not resolve com.google.code.gson:gson:2.8.9.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. For more on this, please refer to https://docs.gradle.org/8.8/userguide/build_environment.html#sec:gradle_system_properties in the Gradle documentation.
> Remote host terminated the handshake
Could not resolve com.google.guava:guava:31.0.1-jre.
Required by:
project :gradle-plugin:shared
> Could not resolve com.google.guava:guava:31.0.1-jre.
> Could not get resource 'https://repo.maven.apache.org/maven2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.pom'.
> Could not GET 'https://repo.maven.apache.org/maven2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.pom'.
> The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. For more on this, please refer to https://docs.gradle.org/8.8/userguide/build_environment.html#sec:gradle_system_properties in the Gradle documentation.
> Remote host terminated the handshake

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.

BUILD FAILED in 17s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
Execution failed for task ':gradle-plugin:shared:compileKotlin'.

Could not resolve all files for configuration ':gradle-plugin:shared:compileClasspath'. > Could not resolve com.google.code.gson:gson:2.8.9. Required by: project :gradle-plugin:shared > Could not resolve com.google.code.gson:gson:2.8.9. > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.8.9/gson-2.8.9.pom'. > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. For more on this, please refer to https://docs.gradle.org/8.8/userguide/build_environment.html#sec:gradle_system_properties in the Gradle documentation. > Remote host terminated the handshake > Could not resolve com.google.guava:guava:31.0.1-jre. Required by: project :gradle-plugin:shared > Could not resolve com.google.guava:guava:31.0.1-jre. > Could not get resource 'https://repo.maven.apache.org/maven2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.pom'. > Could not GET 'https://repo.maven.apache.org/maven2/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.pom'. > The server may not support the client's requested TLS protocol versions: (TLSv1.2, TLSv1.3). You may need to configure the client to allow other protocols to be used. For more on this, please refer to https://docs.gradle.org/8.8/userguide/build_environment.html#sec:gradle_system_properties in the Gradle documentation. > Remote host terminated the handshake * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org. BUILD FAILED in 17s.
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@sunnylqm
Copy link

翻墙问题

@gaoxinxiao
Copy link
Author

./gradlew generateAutolinkingPackageList

Task :app:generateAutolinkingPackageList FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:generateAutolinkingPackageList'.

RNGP - Autolinking: Could not find project.android.packageName in react-native config output! Could not autolink packages without this field.
目前又有这个错误了

@sunnylqm
Copy link

sunnylqm commented Sep 2, 2024

官方确认的bug,会在0.75.3中修复(尚未发布)

这里有一个临时解决办法
facebook/react-native#46134 (comment)

创建react-native.config.js文件,里面添加packageName

module.exports = {
  project: {
    ios: {},
    android: {
      packageName: 'com.awesomeproject',  // 你的项目的安卓包名
    },
  },
};

@reactnativecn reactnativecn deleted a comment from ry-krystal Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants