React-native unable to run-android - android

Following this: https://facebook.github.io/react-native/docs/getting-started.html ,
I've created an empty project and am trying to run it by doing:
sudo react-native run-android
This is what is produced:
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug...
Downloading https://services.gradle.org/distributions/gradle-2.4-all.zip
Exception in thread "main" javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
(I can post the rest of the error if that would be useful). Does anyone have any advice?

Change the distribution url in:
android/gradle/wrapper/gradle-wrapper.properties
from https to http.

Using the following steps i resolved the error :
Open build.gradle (node-modules/react-native/ReactAndroid)
Change src path of task downloadBoost with
http://mirror.nienbo.com/boost/1.57.0/boost_1_57_0.zip
task downloadBoost(dependsOn: createNativeDepsDirectories, type: Download) {
// Use ZIP version as it's faster this way to selectively extract some parts of the archive
//src 'https://downloads.sourceforge.net/project/boost/boost/1.57.0/boost_1_57_0.zip'
// change
src 'http://mirror.nienbo.com/boost/1.57.0/boost_1_57_0.zip'
onlyIfNewer true
overwrite false
dest new File(downloadsDir, 'boost_1_57_0.zip')
}
Perform Gradle Sync
Tools -> Android -> Sync Project with Gradle Files

Chang the distribution url in /android/gradle/wrapper/gradle-wrapper.properties from https to http and also change the gradle version from 5.4 to 5.5

Related

Unable to make a pull in gradle file

i´m trying to make a task in Gradle for my Android project ( using Kotlin DSL ) where I need to do an automatic pull for my "develop" branch.
This are the commnand I want to run :
git pull origin develop:develop
In the terminal this works just fine.
I`m using "commandLine" with "exec" in my gradle file and I´m having this error message:
code:
tasks.register<ReleaseTask>("makePull") {
exec { commandLine("git", "pull", "origin develop:develop") }
}
error message:
ssh: Could not resolve hostname origin develop: nodename nor servname provided, or not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
FAILURE: Build failed with an exception.
I don´t have any issue if I try this commands in the terminal, do you know what i´m doing wrong ?
You haven't separated the origin and the develop:develop arguments in the gradle version. Use this instead:
commandLine("git", "pull", "origin", "develop:develop")

Unable to launch WebDriver Agent because of xcodebuild failure

Me using Xcode_8.2.1 . When i am building my app its trowing error implicit converstation from nullable pointer
I suggest to
Get clean WebDriverAgent project from github repo or via appium installation, you can find it on your local machine:
/Users/someName/node_modules/appium/node_modules/appium-xcuitest-driver/WebDriverAgent
Run ./Scripts/bootstrap.sh for "clean" project in path specified above
Open WebDriverAgent.xcodeproj and check if there are any errors

CODE-PUSH unable to release on VSTS

While trying to release via code-push on VSTS getting the following error:
Unable to find or read "config.xml" in the CWD. The "release-cordova" command must be executed in a Cordova project folder
2017-11-21T09:22:35.1120732Z [Error] Unable to find or read "config.xml" in the CWD. The "release-cordova" command must be executed in a Cordova project folder.
2017-11-21T09:22:35.1200947Z ##[debug]Finished Building Command: node d:\a\_tasks\CodePushReleaseCordova_f5990527-f512-4c14-9f8e-1254240dc3cb\1.0.5\node_modules\code-push-cli\script\cli logout
2017-11-21T09:22:36.2276558Z ##[debug]task result: Failed
2017-11-21T09:22:36.2295997Z Command failed: release-cordova
2017-11-21T09:22:36.2326120Z ##[debug]Processed: ##vso[task.complete result=Failed;]Command failed: release-cordova
Here's the screenshot attached of the problem:
For the detailed log: https://drive.google.com/open?id=1SMk0N47A8OGm5PDUk5e86sPygmMAjD5X
In order to trouble shooting for this error:
Please add two tasks before CodePush task:
1) Add npm task with this setting
https://drive.google.com/open?id=1H4bWAMruzfOs90xOLxgjadAd7DihaVH4
2)After npm task, add Command Line task with below setting
https://drive.google.com/open?id=1bxd54kVgW4zGRwhsH_JKz_cjc1wYZ-No
Then check if the Cordova command can execute correctly
Then if you have specified the variable Build.SourceDirectory
as $(Build.SourcesDirectory)\path to your app
remove it (the variable) as you have already specified the path in GET SOURCES
You do not need to add the “Build.SourceDirectory” variable in this condition. And now, you specified the working directory to “d:\a\3\s\app path” which should not exist on the build agent, but the task didn’t report that error.
The task indicated that it cannot find the config.xml since the file exist under “d:\a\3\s” rather than “d:\a\3\s\app path”.
Thus remove the “Build.SourceDirectory” variable and run the build to check
The above steps should work for the given problem

Gradle in Android Studio 0.44 can't find process on path to run in an Exec Type task

I used to have the following gradle build task:
task buildWebApp(type: Exec) {
executable = Os.isFamily(Os.FAMILY_WINDOWS) ? "grunt.cmd" : "grunt"
args = ["build"]
}
This would pick the appropriate grunt command and run it with the argument "build".
This worked without any kind of issue
I've just tried this in Android Studio 0.4, using Gradle 1.9 and it's no longer working. Instead I get the following error:
Execution failed for task ':BrowserPages:buildWebApp'.
A problem occurred starting process 'command 'grunt''
Normally at this point I would debug with gradlew, but running the following command, throws no errors:
$ ./gradlew buildWebApp
I've also tried running the full task list to still not find any problems.
The way this is executed is from my main build.gradle file with this dependency
copyWebApplication.dependsOn ':BrowserPages:buildWebApp'
Anyone have any ideas?
I've tried to run executable = "node" with arg = ["-v"] and get the same error where it can't find node. Node is globally accessible on my terminal, so I can only assume that the command is being run in a different environment to the terminal. There is the option for setting the environment but I can't find any examples of how it should be used.
Try using a fully-qualified path to the grunt executable. Perhaps something in the path has changed between Android Studio/Gradle/Android Plugin versions.

Jenkins-CI SCP Plugin cannot find files to upload

I have Jenkins-CI compiling an Android app I'm working on. Compiles it great but it will not upload the release apk via SCP. I have set the source to bin/* and it gives me the following error. Does anyone have a suggestion on what I have configured wrong? I've had it working in the past, but I forgot to get the config before I re-installed Fedora on the machine.
[SCP] Connecting to smccloud.com
ERROR: Failed to upload files
2: No such file
at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2289)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1741)
at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:1758)
at com.jcraft.jsch.ChannelSftp.stat(ChannelSftp.java:1715)
at be.certipost.hudson.plugin.SCPSite.upload(SCPSite.java:188)
at be.certipost.hudson.plugin.SCPRepositoryPublisher.perform(SCPRepositoryPublisher.java:218)
at hudson.tasks.BuildStepMonitor$3.perform(BuildStepMonitor.java:36)
at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:682)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:657)
at hudson.model.AbstractBuild$AbstractRunner.performAllBuildSteps(AbstractBuild.java:635)
at hudson.model.Build$RunnerImpl.post2(Build.java:161)
at hudson.model.AbstractBuild$AbstractRunner.post(AbstractBuild.java:604)
at hudson.model.Run.run(Run.java:1400)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46)
at hudson.model.ResourceController.execute(ResourceController.java:88)
at hudson.model.Executor.run(Executor.java:175)
Build step 'Publish artifacts to SCP Repository' changed build result to UNSTABLE
I encountered this error when I was trying to copy to a directory that didn't exist on the target machine. Create the directory(s) on the target first and this should go away and the copy work.
On the target machine you are seeing something like:
No such file or directory
when you try to navigate to the non-existent directory.
If the plugin isn't working for you can use the shell script with expect, as a post build step, to do it for you.

Categories

Resources