- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我是 React Native 的新手我使用以下命令在 React Native 中创建了第一个项目:
但是在执行 "react-native run-android" 时出现了这个错误-
请帮帮我。
After more efforts this error was resolved but now getting another error
Solutions which I have tried was:
Solution 1:
1. Open your project in Android Studio i.e. android folder of your react native project
2. Sync your project so that gradle.zip will download properly
3. Then run your project.
Solution 2:
1. Open your React native project
2. Navigate to android folder within it
3. Go to gradle folder inside it
4. Open gradle-wrapper.properties
5. And modify your distributionUrl from "https" to "http"
6. Run your project
But at the end another error was occurred which was mentioned below.
>react-native run-android
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat ap
p:installDebug)...
Picked up _JAVA_OPTIONS: -Xmx1024M
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'FirstApp'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.21.
Required by:
project : > com.android.tools.build:gradle:3.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.bu
ild:builder:3.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.an
alytics-library:shared:26.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.li
nt:lint-gradle-api:26.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.bu
ild:gradle-api:3.3.2
project : > com.android.tools.build:gradle:3.3.2 > androidx.databinding
:databinding-compiler-common:3.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.bu
ild:builder:3.3.2 > com.android.tools:sdk-common:26.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.bu
ild:builder:3.3.2 > com.android.tools:common:26.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.bu
ild:builder:3.3.2 > com.android.tools.build:manifest-merger:26.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.bu
ild:builder:3.3.2 > com.android.tools.analytics-library:tracker:26.3.2
project : > com.android.tools.build:gradle:3.3.2 > com.android.tools.bu
ild:builder:3.3.2 > com.android.tools:sdklib:26.3.2 > com.android.tools:reposito
ry:26.3.2
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.21.
> Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kot
lin/kotlin-stdlib-jdk8/1.3.21/kotlin-stdlib-jdk8-1.3.21.pom'.
> Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/ko
tlin-stdlib-jdk8/1.3.21/kotlin-stdlib-jdk8-1.3.21.pom'.
> sun.security.validator.ValidatorException: PKIX path building f
ailed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin
d valid certification path to requested target
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.21.
> Could not get resource 'https://dl.google.com/dl/android/maven2/org/j
etbrains/kotlin/kotlin-stdlib-jdk8/1.3.21/kotlin-stdlib-jdk8-1.3.21.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/org/jetbrai
ns/kotlin/kotlin-stdlib-jdk8/1.3.21/kotlin-stdlib-jdk8-1.3.21.pom'.
> sun.security.validator.ValidatorException: PKIX path building f
ailed: sun.security.provider.certpath.SunCertPathBuilderException: unable to fin
d valid certification path to requested target
* 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 13s
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug
我正在我的手机上执行我的项目 我已经使用命令“adb devices”检查了我的设备是否正确连接。显示了我的设备名称。
所以我不知道下一步该做什么。
I was trying to solve this error and got a solution which i have implemented
1. Open your react native project in android studio
2. File -> Settings -> Remote Jar Repositories -> Click on Add Button
3. Add maven Repository URL given below:
https://mvnrepository.com/artifact/com.android.tools/sdklib
4. Sync your project
Many error was gone.
只想帮助解决下面提到的这些错误:
* What went wrong:
A problem occurred configuring root project 'FirstApp'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not download bcpkix-jdk15on.jar (org.bouncycastle:bcpkix-jdk15on:1.56
)
> Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcp
kix-jdk15on/1.56/bcpkix-jdk15on-1.56.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/bouncycastle/bcpkix-j
dk15on/1.56/bcpkix-jdk15on-1.56.jar'.
> sun.security.validator.ValidatorException: PKIX path building fail
ed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find v
alid certification path to requested target
提前致谢!
最佳答案
经过一番努力,我找到了适合我的解决方案。
解决方法:
Step 1:
Open (Project Level) gradle file and add repositories given below:
repositories {
google()
mavenCentral()
jcenter { url "https://jcenter.bintray.com/"}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url "https://maven.google.com"
}
jcenter { url "https://jcenter.bintray.com/"}
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed
from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
Step 2: change directory to android i.e. cd android
Example: Here, my project name was FirstApp so the path was
C:\Users\HOME\Desktop\FirstApp
and then change directory: cd android
So that the path become look like this : C:\Users\HOME\Desktop\FirstApp\android
Step 3: Refresh dependencies i.e. sync your gradle with the following command
gradlew build --refresh-dependencies
Step 4: cd..
Step 5: Execute your react native project
react-native run-android
Hope, it will work to others also :)
关于android - 如何解决错误 "Unable to find valid certification path to requested target while executing command react-native run-android",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55285297/
当我尝试输入时,我正在关注 Ray Wenderlich ( https://videos.raywenderlich.com/screencasts/545-server-side-swift-wi
我正在使用 javax.validation.Validation 来验证 jpa 实体。我总是针对相同的实体进行验证。 我想知道是对所有验证使用一个 validator 更好,还是每次验证时实例化一
Controller : @RequestMapping(...) public void foo(@Valid Parent p){ } class Parent { @NotNull // j
在 login.phtml 中,validator 和 validate 之间有什么区别 - 有人可以解释下面每一行的含义 function onepageLogin(button)
我有一个 java bean 用于将 JSON 消息发送到 spring @RestController 并且我有 bean 验证设置并使用 @Valid 运行得很好。但我想转移到 Protobuf/
我正在使用 vee-validate 来验证注册表单,我编写了如下代码,
使用 有什么区别属性和 标签? 我应该什么时候使用哪一种? 最佳答案 validator属性允许您引用独立的托管 bean 方法,而不仅仅是像这样的验证器
我们有这个 Alamofire 错误处理: Alamofire.request(.GET, getUrl("mystuff")).responseData { response in guar
以下代码创建了两个单选按钮。每个选项都包含一个日期值,该日期值已成功转换为格式为“yyyy-MM-dd”的标签。一旦我做出选择并单击下一步按钮,我就会收到以下错误“j_idt12:comDateCho
是否有类似的验证: req.checkBody('property', 'should be present').isPresent(); 值本身并不重要。 现在我使用这个解决方案: .isLengt
系列文章: 1、async-validator 源码学习(一):文档翻译 2、async-validator 源码学习笔记(二):目录结构 3、async-validator 源码学习笔记(三):ru
我正在使用 Backbone.Validation插入。我有一个模型可以在服务器端进行唯一性检查。我如何让 backbone.validation 识别错误并运行我设置的回调以显示返回的错误消息? t
我有一个 Knockout.Validation 场景,我认为该场景相当普遍,但尚未通过在网络上搜索和本网站上的各种答案找到解决方案。 我正在验证的属性在 ajax 调用之后才会添加到可观察到的 kn
我是 Knockout JS 的新手。我需要一个验证器来验证用户将在文本框中输入的日期。为此编写了如下代码 ko.validation.rules['date'] = { validator:
如何在 JSF 验证器中比较两个字符串是否相等? if (!settingsBean.getNewPassword().equals(settingsBean.getConfirmPassword()
我有简单的域: package app class Customers { String CUSTOMER String NOTE static mapping = {
我正在使用 ember-validations 来验证表单中的模型。 如果我使用 createRecord 创建记录,则模型的实例已经过验证,因此在用户输入值之前表单已经显示验证错误。 我只想在提交表
我有两种不同的服务:第一个是将对象保存到数据库,第二个是更新现有对象。 我正在对我的对象使用验证约束,例如(@NotBlank、@Size、@Pattern 等),在第一种情况下,我需要验证对象的所有
我有 2 个 ensure - 验证装饰器用于 2 个字段:password 和 retypePassword。我想在填写 retypePassword 字段时检查这两个字段是否相等。 问题是,当我在
I'm aware that it's a bug ,但是在域类上调用 validate() 会覆盖之前放入的任何拒绝: def save = { def assignment = new A
我是一名优秀的程序员,十分优秀!