Build errors in blank Xamarin.Forms app - android

I use Xamarin for VS and I get 36 errors, this is the first one:
Severity Code Description Project File Line Suppression State
Error Please install package: 'Xamarin.Android.Support.Design' available in SDK installer. Android resource directory C:\Users\Cayl\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3\embedded./ doesn't exist. forms.Droid
I gather it's because XF don't support the current Android Support Library I have (23.1.1), how do I fix this step by step, do I uninstall Android Support Library and get 23.0.1 from internet somewhere or what?

Those errors are due to the failure to automatically download the zip files from Google the first time (after that they are cached for project reuse).
If you have network access to dl-ssl.google.com, then cleaning and rebuilding the project "should" work. Sometimes exiting and restarting Visual Studio (or Xamarin Studio on OS-X) and then rebuilding will start the downloads again properly.
Otherwise the error message shows the download link for the zip file(s) needed and the directory that you need to manually place them in:
Example Error Message:
Please download https://dl-ssl.google.com/android/repository/android_m2repository_r22.zip and put it to the C:\Users\YOURUSERID\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 directory.
Once they are downloaded, they will be available for all future solution/projects.

It sounds like you might have a corrupt download. Please try deleting the zips folder, and any Android.Support.* folders from inside C:\Users\username\AppData\Local\Xamarin.
Then, delete the bin/ and obj/ folders from your solution's project folders, restart Visual Studio, and rebuild.

Related

Build failed, Cause: error reading zip file

My android studio was running perfecly yesterday, but today when I started my android studio and want to run an app on mobile the following error occurred,
I searched on the internet and stackoverflow but no solution is useful
I even manually downloaded the gradle-4.6-all.zip from the gradle/distribution and pasted in ~\.gradle\wrapper\dists, but the error still there.
kindly help me with this.
The error occurs because you don't have unzipped gradle files in ~\.gradle\wrapper\dists directory.
Extract the zipped gradle-4.6-all.zip and extract it in
~\.gradle\wrapper\dists directory.
Alternatively ,Android Studio will automatically use the Gradle wrapper and pull the correct version of Gradle. Beneath your Android Studio's project tree, open the file gradle/wrapper/gradle-wrapper.properties. Check for this entry to be:
distributionUrl=http\://services.gradle.org/distributions/gradle-4.6-all.zip
Clean rebuild the project.
Download Link for Gradle Versions: http://services.gradle.org/distributions/
References:Manually install Gradle and use it in Android Studio

Android Studio build error or misconfigured

I am having trouble building with Android Studio on one of my computers. The same project was building fine and when I pushed to github and pulled from the other machine I get the following error
Argument 0 for #NotNull parameter of com/intellij/execution/configurations/GeneralCommandLine.setExePath must not be null
I tried generating a new default project and I get the same build error so it must be something with my setup.
Does anyone know what I can do to fix these issues? Or even how to completely uninstall Android Studio and start fresh? Thanks
I had same error. In my case it was caused because of modification some important configuration. I fixed the issue by executing following steps:
File -> Other Settings -> Default Project Structure
SDKs
Add new SDK (select JDK option)
Specify path to JDK (in my case it was "C:\Program Files\Java\jdk1.7.0_45")
Save changes
You can also check if you have configured path tho the Android SDK
Good luck!
Had the same problem. Had to uninstall Android Studio, delete all files related to it including install files, the .AndroidStudioPreview folder under your user directory, and those files made in your project's folder upon importing. This amounts to the idea folder and the [projectname].iml file. Now reinstall and re-import the project. You can reuse the same build.gradle. Mine's working now.

Android Logcat files on Hudson/Jenkins

we are using Hudson for CI of an Android project with Android emulator plugin to run UI tests on the emulator. A git project delivers the source code.
Now I see that in the git repo, for each build a logcat file is created and put in the git project folder, which is then pushed back to git. As we are expecting a lot of builds, this could easily spam the project folder. Does anyone know if it is possible to set the destination folder for the emulator logs?
I cannot find any options in the emulator plugin or Hudson anywhere.
The logcat files are named logcat_[some_number].log.
Best regards,
Kim
Upgrade to version 2.0 of the plugin (or newer) and you'll see these logcat files are now written to a temporary directory, rather than your workspace.
If you're using Hudson, possibly you only see the very old version 1.6 in the Update Centre.
Which is just another reason to upgrade to Jenkins! :)
However, if you can't upgrade either the plugin or Jenkins (for some weird reason), just use an "Execute shell" step to delete any logcat_*.log files at the start of each build.
These files are purely temporary anyway and should probably only exist in your workspace after a failed build — otherwise the logcat output is archived automatically as logcat.txt.
Add an ant task to rename the logcat file to your convenience and remove the oldest ones.
add the logs to the .gitignore file, if you want to exclude them from your repository.

Eclipse Android project SVN checkout: folder locked

Trying to check out my Android project from an SVN repository, I got the following error:
0x0000000f: The folder 'E:\workspace\mc-01-02\project.properties' is locked by some external process. Please unlock the folder and try to check out the project again.
project.properties actually is a file, not a folder.
As a test, I created another project and added the "project.properties" file to svn:ignore. I got this:
0x0000000f: The folder '/media/D/workspace/andi/.fuse_hidden00002a6900000003' is locked by some external process. Please unlock the folder and try to check out the project again.
Again, ".fuse_hidden00002a6900000003" is a file, not a folder. In both cases, the files were created with content and perfectly readable.
As you might have noticed, I tried this from a Windows Eclipse and a Linux Eclipse. (I have my workspace on my Windows partition.) Both attempts failed. Yet, checking out to a workspace on the Linux partition succeeded.
I'm using Eclipse Galileo with the Subversive plugin.
This might be a problem with Android tools interfering?!?
Input, anyone?
Select the project
Right click on the selected Project
Team -> Cleanup
Then try

could not find apk in android

I am using spring and maven plugins in eclipse but when i want to run this project it returns Could not find ShopZilla.apk? How this will resolved, Please suggest me.
Make sure after updating your android sdk sdk build tools are updated properly. You can check it by Open sdk manager -"Android Sdk Build Tools" status must be installed. if the status is not installed then install Android Sdk Build Tools for the same.
If you have got all required plugins installed (ADT, M2E and M2E Android), the apk should be automatically generated by IDE.
Sometimes the apk file is not generated simply because there are some android build error in your project, unfortunately, these are not compile error so they are not shown in Eclipse problems view. For example, if you attach a icon.jpg file in your res/drawable folder and change the extension to png, you get no compile error in problems view, but if you then manually delete the apk file in your project output folder, the apk file will not be generated again and in this situation Eclipse only gives very generic message "could not find *.apk file" in console view, when you trying to run it on emulator.
Now the only question is how can we tell if there are android build error. right click your project, choose Android Tools -> Fix Project Properties. in my jpg/png example, Eclipse will show "libpng error: Not a PNG file, ERROR: Failure processing PNG image C:\android-sandbox\source\yourproj\res\drawable-mdpi\icon.png" and project marked as a error in package explorer view. as soon as you replace icon.jpg with a real png file, bingo, apk automatically generated. Though I am not sure if this can detect all subtile android build error.
If you are using the ADT plugins greater than ADT17 then rename your "lib" folder to "libs".
Then Right click on project => Android tools => Fix project Properties => Clean your project
If still issue then just restart your eclipse. Your issue will be gone.
Please follow these steps; this might help you out:
Go to Project->Properties
Select Android from left-hand side list
Uncheck the "Is Library" checkbox
or
projects -> clean

Categories

Resources