Gradle build is getting failed while running command build all - android-studio

Download https //jcenter.bintray.com/org/apache/commons/commons-parent/11/commons-parent-11.pom
BUILD FAILED
Total time 1 mins 55.436 secs
FAILURE Build failed with an exception.
What went wrong ?
A problem occurred configuring root project native.
Could not resolve all dependencies for configuration classpath .
Could not download artifact com.android.tools.build gradle 0.14.4 gradle.jar
Could not GET https //jcenter.bintray.com/com/android/tools/build/gradle/0.14.4/gradle-0.14.4.jar
Connection to https //d29vzk4ow07wi7.cloudfront.net refused

This is because the server does not have internet access to download the gradle files.
You either need to give the server internet access to get the gradle files or manually download them, put them on a HTTP server and point the gradle-wrapper.properties for each application to the file location.
Can also try pointing to a local directory but I am not sure if that will work.
gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle-2.1-all.zip

Related

build.artifactstagingdirectory doesn't exist Azure Devops

I'm trying to publish a ClickOnce application. To do so, I'm building the project with the msbuild publish target argument, copying the files to the artifact staging directory, then attempting to upload that directory via FTP.
However, the ftpupload task is failing:
With the following error:
550 The system cannot find the file specified.
For whatever reason, removing the / at the begging of the Remote Directory field fixed it. Most say the / at the beginning is needed, however. It might vary from one FTP server to another.
550 The system cannot find the file specified.
This error doesn't indicate that the specified files are missing in build.artifactstagingdirectory folder.
Actually the task would always succeed with the warning Could not find any files to upload even when the build.artifactstagingdirectory folder is empty:
To make the FTP upload task work successfully, you may need to check your Remote directory input of that task and make sure your FTP remote Server is configured well.
1.Assuming your remote home directory is C:\FTPfolder. You should use /TestFolder/as input if you want to upload the files to C:\FTPfolder\TestFolder. (Be careful about the slash)
2.If your upload task would create a new folder in remote directory during this process, you should make sure the user account has the related directory access like creating sub-folders...
PS: I run this pipeline in my self-hosted agent to upload files to remote directory in remote machine with Serv-U ftp server. The task works well in my side.

NopCommerce error SevenSpikes.Nop.Plugins.Core.dll' is denied

I got this error continually on my nopCommerce website.
Application startup exception:
System.Exception: Plugin 'Seven Spikes Core'.
Access to the path
'C:\Inetpub\wwwroot\mywebsite\Plugins\bin\SevenSpikes.Nop.Plugins.Core.dll' is denied.
I have tried disabling overlapped recycle in the application pool and still, I still get the same error occasionally. What's the permanent fix?
I'm using nopCommerce version 4.20 version.
It is because of the shadow copy of plugin which is resolved at the nopCommerce4.2. To resolve the error you need to follow below steps
You need to stop app_pool and the website.
Remove the all .dll from the plugin bin folder(your website==>Plugins==>bin)
At the appsetting.json(root directory of the website) change "UsePluginsShadowCopy" :
true to "UsePluginsShadowCopy": false
Start the app_pool first then website.
It should resolved the error. I faced same problem and get solution by following the above steps. You do not need to disable overlapped recycle.
After I copied the site folder to a new folder I gave this folder the APP-POOL permisions:
'IIS APPPOOL\My-IIS-Site-Name' then - restart IIS.

Android Studio: Gradle Sync failed

I have a problem with Gradle
Gradle sync failed: Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not determine artifacts for com.android.support:appcompat-v7:25.1.1
Could not get resource 'https://maven.google.com/com/android/support/appcompat-v7/25.1.1/appcompat-v7-25.1.1.aar'.
Could not HEAD 'https://maven.google.com/com/android/support/appcompat-v7/25.1.1/appcompat-v7-25.1.1.aar'.
Connect to maven.google.com:443 [maven.google.com/216.58.205.163] failed: Connection timed out: connect
Connection timed out: connect
Consult IDE log for more details (Help | Show Log) (38m 44s 794ms)
I have not used Android Studio for three months, so I think the problem is related maybe to some not uploaded configuration files. Or what else?
Thank you.
You can't connect to https://maven.google.com, you have a timeout.
Check your internet connection
Check your firewall / proxy / gateway
Just type https://maven.google.com in your browser and make sure it's working

Azure Node hosting file/folder permissions

I have launched my sails.js app to Azure Node.js shared infrastructure.
App does not lift due to file permission. Seems like grunt tasks cannot create
concatenated files in .tmp directory in the root.
I tried to give write access via FileZilla but it did not worked. When ever I try to hit URL
I see file permissions are getting set into default values.
I also did not see any settings to give Folder permissions at Azure Dashboard.
Is there any workaround on this issue?
Error:
** Grunt :: An error occurred. **
------------------------------------------------------------------------ [31mAborted due to warnings.[39m Running "sails-linker:prodJs"
(sails-linker) task[24m Autoinsert script tags in an html file
[33mWarning: ENOTSUP: operation not supported on socket, scandir
'D:\home\site\wwwroot.tmp\public\concat\production.css' [39m
------------------------------------------------------------------------ Looks like a Grunt error occurred-- Please fix it, then restart
Sails to continue running tasks (e.g. watching for changes in
assets) Or if you're stuck, check out the troubleshooting tips below.
[4mTroubleshooting tips:[24m
*-> Are "grunt" and related grunt task modules installed locally?
Run npm install if you're not sure.
*-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
*-> Or maybe you don't have permissions to access the .tmp
directory?
e.g., D:\home\site\wwwroot\.tmp ?
If you think this might be the case, try running:
sudo chown -R YOUR_COMPUTER_USER_NAME D:\home\site\wwwroot\.tmp
According to the error information below, it seems that the sails app default start up for websocket on the port 1337, but the Azure webapp only enable the ports 80 and 443.
Warning: ENOTSUP: operation not supported on socket
There was an SO thread Deploy sails.js to Windows Azure Website that discuss about deploying the sails app on Azure WebApp.
Hope it helps. Best Regards.

Can't build Android app using crashlytics behind VPN and proxy

As a teleworker I use a VPN with a proxy.pac (config file is available at http://proxy.mycompany.com/proxy.pac).
To update packages Android SDK Manager, the following proxy settings work properly:
HTTP Proxy Server: proxy.mycompany.com
HTTP Proxy Port: 80
In Android Studio I work on an Android-Gradle project using crashlytics. I have set the same parameters in Proxy HTTP.
A gradle assembleDebug command fails when checking crashlytics apikey:
:myproject-project:compileDebugNdk UP-TO-DATE
:myproject-project:preBuild
:myproject-project:preDebugBuild
:myproject-project:checkDebugManifest
:myproject-project:prepareDebugDependencies
:myproject-project:compileDebugAidl UP-TO-DATE
:myproject-project:compileDebugRenderscript UP-TO-DATE
:myproject-project:generateDebugBuildConfig UP-TO-DATE
:myproject-project:processDebugManifest UP-TO-DATE
> Building 32% > :myproject-project:crashlyticsCleanupResourcesDebug
then after timeout:
ERROR - Crashlytics Developer Tools error.
com.crashlytics.reloc.org.apache.http.conn.HttpHostConnectException: Connect to api.crashlytics.com:443 [api.crashlytics.com/54.225.193.37, api.crashlytics.com/54.243.69.50, api.crashlytics.com/54.243.106.90, api.crashlytics.com/54.243.136.142, api.crashlytics.com/54.243.186.185, api.crashlytics.com/107.21.114.251, api.crashlytics.com/184.72.240.69, api.crashlytics.com/54.225.68.102] failed: Connection timed out: connect
at com.crashlytics.reloc.org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:138)
...
I have tried to set gradle properties in ~/.gradle/gradle.properties file:
systemProp.http.proxyHost=proxy.mycompany.com
systemProp.http.proxyPort=80
... but it not seems to be a great idea as I have a warning in HTTP Proxy settings (those settings are obsolete).
I have ask people from network to snif what happens, and there are access failure on URLs like http://dl-ssl.google.com (same that are used in Android SDK manager), or EC2 on Amazon (possibly used by crashlytics, isn't it?).
Of course all this runs perfectly when I'm directly connected in my company's LAN.
Any idea of what could happen? Any workaround?
Thanks for support. Jean
EDIT:
Solution is to set https proxy server and port in ~/.gradle/gradle.properties file. In my case, http parameters seems useless.
systemProp.https.proxyHost=proxy.mycompany.com
systemProp.https.proxyPort=80
Thanks for you help!
Hemal from Crashlytics here. Can you set https.proxyHost and https.proxyPort? In addition, if you have one, go ahead and set https.proxyUser and https.proxyPassword as well! This should take care of it for ya :)

Resources