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.
Related
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
I'm trying to run a hello world flutter app for the first time on my device, but when I hit run on android studio, it shows initilizing gradle, and it stays like that for more than 20 minutes with no logging or error, I have an intel i5 as a CPU and I'm running it on Linux (dual boot, my download speed is quite slow (200 kb/s average download rate), in case this help
I installed the Flutter SDK and when I try adb devices on my machine it shows my device connected .
So why it's taking that time to run ? (until now it didn't run yet)
https://github.com/flutter/flutter/issues/15106
Please note riftninja's answer.
I look at this directory: C:\Users\myname.gradle\wrapper\dists
Yes, the gradle file is really big: 87M. You have to wait for a long time.
After this will be "Resolving dependencies....", which also slowly.
But finally it succeed.
I've faced the same problem, and my internet is currently very slow, so I solved it by changing the gradle in flutter project to an already downloaded one. Just follow these steps:
Go to C:\Users\YOUR_USER_NAME\.gradle\wrapper\dists
You should find one or more folders with the name of the distribution (for example with the name "gradle-4.6-all" if you were developing in Android Studio previously), choose one of these folders (make sure it is not empty) and copy its name.
Open Android Studio project explorer, and locate android\gradle\wrapper\gradle-wrapper.properties
You will find a line like this:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
Change gradle-5.4.1-all with the folder name you copied in step 2.
Run your app, and hopefully it works this time.
When running flutter project first time even correct configuration it takes very long time.
That is because of downloading gradel and dependencies for particular version.If you ar noob Wait it to complete automatically till all files get downloaded. By using command:
flutter run <project-name> -v you can see whats happening in background.
To Manually downloading gradle zip and put to suitable directory. Go in Project Dir:
/android/gradle/wrapper/gradle-wrapper.properties and click on url and download it.
After Downloading it visit to :/Users//.gradle/wrapper/dists/gradle-4.10.2-all/9fahxiiecdb76a5g3aw9oi8rv your version path may vary
and paste downloaded zip inside it.
For Dependencies to download you need to wait depending on Internet speed.
It is one time process until next updated version and dependencies come UP.
Providing an active internet connection worked for me.
To build gradle offline,
For Windows,
Go to File -> Settings.
And open the 'Build,Execution,Deployment'. Then open the
Build Tools -> Gradle
Then check the box -> Offline work below.
Click the OK button.
For Mac OS,
go to Android Studio -> Preferences, and the rest is the same.
Goto Android Studio - File - Other Setting - Default Project Structure
Uncheck use Embeded JDk
Below, set your JDK path.
Found in Program files - Java - Jdk.
try to making use of flutter run -v which will basically giving the info which is running in background.
The problem is that Gardle is downloading dependencies and not using any way to show progress(This is NOT good for UX), so it is better to run gradlew.bat in the terminal and things will become more clear, like this:
Now it is much better, You can have a cup of coffee while watching it ;)
Although I’m able to run the apk on phone, but whenever I try to build and run my project directly from Unity on phone, it doesn’t work. This is the error message it shows:
On checking the console, these are the messages it shows:
But I'm pretty sure my path is correct, I checked it multiple times. Also, the APKs are building and working fine. Let me know how can I Build and Run from Unity as I'm not able to debug the applications.
This seems to be a known issue that is solved by downgrading the Android SDK tools to an older version as reported here.
I am just going to re-narrate the steps in the link I shared above for convenience as follows:
Go to Android Studio website.
Scroll down to the end of the page and download the command line tools from the section titled as "Get just the command line tools"
In your computer, go to $AndroidSDKHome$ and rename the tools folder to tools.bak
Extract the contents of zip file that you downloaded to the $AndroidSDKHome$. This basically will replace your SDK tools folder with a downgraded version.
So here's the problem android studio works perfect earlier for me
but now whenever i open project it android studio would start normally up to the point where background task tell its's indexing file then my computer would stop
my log file is here github link
here's things i already did:
reinstall android studio with diffrent drive
reinstall windows 10
update sdk components
please help..
Maybe the problem is in the configuration folder. There is a hiden folder with all the configuration options. I had the same problem in Ubuntu, and I just delete this folder, and start again to configurate the IDE, but it doesn't shutdown nothing anymore
I have a problem with Android Studio. Since this morning I can't edit my layouts through the Design interface. It's stuck on "Initializing Rendering Library" and the IDE freezes. All my layouts were working well yesterday and I haven't changed anything since then.
I have tried to invalidate the cache and restart but without any result.
Try that steps :
1.Update Android SDK and Android Developer Tools.
2.If that will not help, reinstall Android Studio using the newest available version (remember to do a backup of your data and projects).
3.If that will not help, install other IDE for example Eclipse and import all your projects to it.
Good luck !
For me helped such steps:
Remove .gradle folder from the project folder, all *.iml files and
.idea
Remove C:\Users\username.AndroidStudioPreview1.2
Run Android Studio without importing settings. This will allow to see a dialog where you can open your project from scratch. If you
import settings then Android Studio will open previously opened
*.xml files which caused the problem (hanging "Initializing Rendering Library") and the situation will happen again
Run Gradle cleanup
Sync project
Invalidate cache and Restart
Build the project from command line. If use Build from AndroidStudio I got hanging "scanning files to index..."
I reinstalled my android studio without success,
Then, I downloaded the sdk again, and change my old sdk-path to the new one
After I restarted my studio, it works.
The most mysterious thing is, I rechange my sdk-path back to my older one, then every thing is ok,I don't know why,but it solved the problem