Read Time Out Android Studio downloading gradle builder - android

I'm working with Android Studio on a restricted network. I have a new project with an empty activity but it doesn't build and it's the first project.
When I downloaded Android, I had to add the certs of google and jetbrain, because the network, and that worked, but when it started to build it and download all files of classpath, says the error "Read Time Out" it is because it cannot downloaded builder.jar from google repository, It's weird because all the other files downloaded good but whit this one is the error!
I've tried to reinstall Android Studio and it doesn't work, I've tried to create a new project and it doesn't work too, I don't know what could be... I thought it was the speed connection, but when I put the URL ('https://dl.google.com/dl/android/maven2/com/android/tools/build/builder/3.1.3/builder-3.1.3.jar') in navigator it starts to download.
Android Studio Version: 3.1.3
This is my build.gradle
This is the error

It was because the speed connection, so I downloaded from the URL and I put them in .gradle folder, (I have to search the exact location) and it works. :D

Related

Config android studio for offline not working

I need to use android studio at work, but the proxy doesn't let me download the packages, so I try to use android studio in offline mode following this tutorial:
https://developer.android.com/studio/intro/studio-config#offline
So I completed the steps, and created a project. I activated 'offline work' in the Android Studio->settings->gradle, but when I try to build it, android studio still tries to download gradle. I also get an error when syncing: Unknown host 'services.gradle.org'. You may need to adjust the proxy settings in Gradle.
btw the 2 zip files for maven and gradle each contain one folder. do I need to extract these folders or their content into the manual-offline-m2 folder? I assume the latter but I tried both and it didn't work

Android Studio isn't working AGAIN

Before AS was refusing to install the APK onto the Glass so I uninstalled it, deleted all the files, and reinstalled AS using the installer file downloaded from the website. I downloaded and updated all the APIs I need and now it is coming up with one of two errors:
IDE internal error occurred
Failed to set up Android modules in project 'My Application'
or
Error:Module 'app': platform 'Google Inc.:Glass Development Kit Preview:19' not found.
This is happening on both my desktop and my laptop(which I didn't reinstall AS on). There doesn't seem to be any pattern to these errors and I don't know what to do, each error I fix just uncovers another error.
Maybe AS is not looking in the right place for the SDK.
Change the location of the SDK and try again. If it still doesn't work, try to delete all the SDK files (or move them elsewhere). Warning!!! This will take a long time to re-download the files.
If it still doesn't work then you will have to take a backup of your project (copy the whole project folder), then delete the project from AS. Then make a new project and copy the program and everything back.
That's all I can help with.

I can not run the app after I update Xamarin.Forms

Ok, here is the thing:
I am using Xamarin.Form to build an app that targets both iOS and Android. I am using Xamarin Studio for Mac
I create the app and the solution creates App, App.Droid, App.iOS project.
In every project there is an indication that show some packages need to be updated.
I run the Droid project in a Samsung S5 API 21, without doing the update, and the app is installed in the device.
I do the update of the packages, to update Xamarin.Form in 20.0.+ version base on the feedback of this question: https://forums.xamarin.com/discussion/57283/unable-to-find-a-version-of-xf-compatible-with so I just update the Xamarin.Form package.
I run again in a Samsung S5 21 but there are some errors : /Users/crs/Projects/time.al/Droid: Error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and extract it to the /Users/crs/.local/share/Xamarin/Android.Support.v4/23.0.1.3/content directory. (XA5209) (time.al.Droid)
What can I do, because I need to update the Xamarin.Forms to the latest version, but I am stuck with this for a long time.
You should:
1-Download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip
2-Go to: /Users/crs/.local/share/Xamarin/Android.Support.v4/23.0.1.3/content
3-Copy the repository downloaded here and unzipped
This worked for me
You should:
Download https://dlssl.google.com/android/repository/android_m2repository_r22.zip
Then go [username]\AppData(hidder folder)\Local\Xamarin\zip
and delete any zip file from there. then rebuild you project and goto step 2 location you should found there something like 96659D653BDE??????????.zip file which visual studio try to download stop build and copy step 1. downloaded file in step 2 location and rename that file with this 96659D653BDE?????????? and remove 96659D653BDE??????????.zip file which is uncompleted.
Then go to visual studio and rebuild your project wait and Viola you got rebuild success. Good Luck
Just remove the corrupted file (android_m2repository_r22.zip) and try again. This happend me like two times by the bad internet connection.

Fails to generate apk file

Ok, so recently I've been trying to run my application on Android Studio (1.1.0), but every time I try to run it, the following error pops up:
Waiting for device
Target device: samsung-blah-blahblah
Uploading file local path: C:\Users\jimmykim9001\AndroidStudioProjects\blahblah\app\build\outputs\apk\app-debug.apk
remote path: /data/local/tmp/blah.com.blah
Local path doesn't exist.
Now by doing some research I've come to this link: https://www.youtube.com/watch?v=i4WcMIyc8OQ This would have been helpful if I was able to find my apk files when searching my project; however, they're not there, which is strange because I'm pretty sure they're supposed to be created automatically. So I tried to rebuild the project, but that fails half-way through (Failed to complete Gradle execution. Cause: ). What I need to do is get Android Studio to generate the app-debug.apk file, but I have no idea how. All the links I've found involve moving the file into the right place, but the file itself doesn't exist for me. Any ideas?
Note: I imported a jar file recently and ever since I did that, the problems started. Not sure if this matters or not.
I got your question. I have also faced the same problem some time ago. Let me clue you in , here is some approach i would like to try :-
Your apk must be here ( if it have been automatically generated)
your_app_name\app\build\outputs\apk
If app-debug.apk is not there then , Clear the cache File -> Invalidate Cache, then restart your IDE . Then rebuild it.
Try removing the jar you have recently added and rebuild the project.
you can try re-importing your project.
From above all what worked for me 1st point . Try these .................................best of luck.
Here are some links you might like to see....
Build unsigned APK file with Android Studio
Apk location in New Android Studio

Android Studio 0.5.8 and Gradle to work offline after gradle zip is downloaded

I've installed a fresh version of Android Studio and from there created a new application. It created my file but the Gradle causes me a lot of problem. For the whole day straight it always try to download the gradle-1.10-all.zip but as always it fails.
Message is:
Gradle:Download http://services.gradle/org/distributions/gradle-1.10-all.zip
Hope they decide to add up some progress bar for this. LOL
I'm in doubt that this is due to internet connection just to take note. Although I'm investigating about the possible solution via HTTP proxy.
Now for an alternate solution I tried to download the whole zip file instead from http://www.gradle.org/downloads. While I successfully downloaded and extracted the whole zip file. Then from android Studio I tried setting the Global Gradle Settings into offline work and as well as the Project-level settings into: use local gradle distribution and mapped the extracted zip file (although I'm not sure if this is the correct way to do this)
Does anyone know on how should I do the workarounds for this?
Hope that maybe someone can help me work with this or someone who already solved this issue since for now I don't have a plan to update from this version anymore given that each and everytime that the Android Studio updates it was always been a pain in the ass and Second I need to work on most of my projects offline.
Found out the solution on this. First you need to download the whole zip file from: http://www.gradle.org/downloads
Next step is to just let the Android Studio Create the folder for the .gradle in your User then from there you can just halt the project initialization and then go to the location of the .gradle folder. In my case it's:
C:\Users\USER\.gradle\wrapper\dists\gradle-1.10-all\SOME_SORT_OF_STRING
Just copy and paste the whole zip file on the location (no need to unzip the file). Also you have to make sure it has the same version with the one in your gradle wrapper folder which in my case is gradle-1.10-all.
Try restarting the Android Studio. You can create a new project once again and let it extract the zip file. It should now start on downloading the other files needed and from here you will need a reliable and stable internet connection. The succeeding files will have a smaller size compared to the zip package but in my case since I don't have a stable connection I used to tether my mobile phone instead and viola! Android Studio installation is now complete and running.
There exist options for offline working.
On command line add --offline option to your gradle command.
In Android studio you can set this option in the setting on the gradle configuration part. Just check the checkbox
Another way of doing is to find a friend that is already started using the studio, You can copy .gradle ,. androidstudio/.androidstudiobeta and .android directories in your user directory. If gradel is your only problem just copy that one only.

Categories

Resources