Android studio error i can't build any app - android

I'm from a country that is blocked from google android developers so I download it through en.uptodown.com. I have installed and everything but still I can't build any app.
I tried to use offline mode but nothing helped me to fix this error and when I use it without offline mode I wait a lot and I don't get anything, screenshot of the errors
Please keep it in mind I can't use SDK manager because I'm from blocked countries.
If anyone can help me how to use the Android Studio offline and which SDK files that I need to use android studio offline because I start to think I have to use eclipse but it's old

You can use the this link to download what ever you need. It contain all the build-tools and platform tools.

You should change your country in your control panel
Windows 10 : Settings -> Time & Language -> Region and Language
I hope this helps, haven't tried it yet.

Related

Xamarin Blank Screen

I am trying to explore Xamarin, trying to create simple CURD project.
I was able to make some progress by watching youtube video's, but I am not sure what went wrong all of the sudden I am getting blank screen in my emulator when I am trying to deploy the project.
Firstly it showed me error stating
'the targetFrameWorkVersion is greater than my project version. You
need to increase the version for the project'.
I tried it, I increased my project version. This issue got resolved but gave birth new error.
Secondly
'To deploy this application, your deployment target should be running
Windows Universal Runtime version 10.0.16299.0 or higher. You
currently are running version 10.0.14393.2007. Please update your OS,
or change your deployment target to a device with the appropriate
version.'
I looked up for newer version of OS, but it seems my OS is already up to date.
I really appreciate if anyone help me out with tips or clue.
Environment is as follows
Visual Studio: 2017
Operating System: Windows 10
I am attaching ScreenShot of error
:
Try this
Set your android project as StartUp project
In your VS menu go to Build ->Configuration Manager
Uncheck the UWP project from both Build and Deploy, i hope your issue will be sorted.
first
its not your SDK, this is cause by old nugets in your project.
update all your nugets. at least xamarin.forms.dll
second
update your windows OS to latest. then
install appropriate microsft windows mobile sdk version. the link should appear when you right click your project and select install missing features
https://learn.microsoft.com/en-us/windows/uwp/updates-and-versions/choose-a-uwp-version

Basic Xamarin Android SDK Issue

I've never struggled with anything in programming as much as this Xamarin installation, unbelievably flakey. I've got my environment (VS 2015 Enterprise) to a point whereby I can spin up a new Blank App (Android) but the designer requires a newer version of the Android SDK (apparently):
I've only just installed the latest Android Studio, so I can confirm (in Xamarin settings) I'm pointing to the correct path for the SDK (in AppData/Local etc.)
On opening the SDK manager I can see the latest SDK tools is installed.
Please note: I've also tried running the SDK manager independently of VS (and as admin).
Never had this much trouble trying to get something installed and configured. Any help MASSIVELY appreciated.
Whoever helps me crack this gets a massive bounty.
EDIT:
Found this in the logs, fairly certain this is the issue:
Xamarin.VisualStudio.Android.MonoAndroidDesignerPane Error: 0 : [2016-09-22 16:36:54.2716] System.AggregateException: One or more errors occurred. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Xamarin.VisualStudio.Android.Designer.MonoAndroidDesignerDocumentCache.Push(String filePath, AndroidDesignerDocumentCacheItem value) in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerDocumentCache.cs:line 25
at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.OpenViewCode() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 619
at Xamarin.VisualStudio.Android.MonoAndroidDesignerPane.b__66_0() in C:\data\lanes\3513\c4382f51\source\xamarinvs\src\Core\VisualStudio.Android\Designer\MonoAndroidDesignerPane.cs:line 612
EDIT
Bounty is for Jon when it allows me to award it. This issue has already been resolved.
Try to delete your obj/bin folders as it seems you might have an AndroidSdksCache holding the old version. Specifically look for a file here obj\Debug\sdks.cache.
The second note is that you have build-tools 23.0.0 installed. Please uninstall that version and any other old version and install 24.0.2.
It shows the current directory as being C:\sdk1\ when the referenced SDK version is different in your screenshot. You will need to update C:\sdk1\ to the latest Android SDK Tools.
I think that can be many things.
1) some time your user name in your PC if have character specials like accents or spaces. Make problems with the VS.
2) you need check if you install Visual studio Emulator android. After donwload a device and check the api that have that device.
Windows 8 or windows 10 pro.
https://www.visualstudio.com/en-us/features/msft-android-emulator-vs.aspx
Don´t use the generic emulator. If you dont know how configure.
3)Make sure that you have install Xamarin correctly in your VS.
Tool -> options -> Xamarin
you need watch all the green check.
if the android dont have the green check. Search the route when you have install the sdk. For example watch the image. My root for example
Let me know if this solve your problem. Regards.

Xamarin installation and update keep crashing

I am trying desperately to make my Xamarin studio work again. I was on Xamarin studio 5.10.3 and I try to update it to 6.0.2 and it keep crashing , I uninstall everything, delete all the xamarin folder information, delete the key product with regedit, download everything again and again but nothing is working, it is stuck to version 5.10.3 newer version even stable keep giving me the same error message (screenshot in image attachement). thanks in advance guys for your help
Screenshot here
Although you could work around this by ensuring the correct items are installed. We highly recommend that you move over to use Visual Studio on Windows instead.
https://www.xamarin.com/faq#xpq6
Here are some things you may need to ensure are installed to see if it resolves your problem even though the FAQ above is saying differently:
1) Ensure you download the correct developer pack: http://getdotnet.azurewebsites.net/target-dotnet-platforms.html
(4.5.2 should suffice)
2) Ensure you have MSBuild Tools 2013/2015 Installed
https://www.microsoft.com/en-us/download/details.aspx?id=40760
https://www.microsoft.com/en-us/download/details.aspx?id=48159
However I would recommend just using VS from this point on as noted in the FAQ.
As I see in your screenshot, when Xamarin Studio opens, you see MonoDevelop stuff instead of Xamarin. I had the exact same problem some months ago. I solved it by going to main menu > account and then log out. Then restart and log-in again.
Still not sure if that will work in Windows because it was on a mac in my particular case.

Visual Studio 2015 Xamarin deploy fail without any error message

I just installed VS 2015, the installation was finish (after some fail time caused by the slow network, I run setup again).
I create a project as Android > Android blank project
When I press F5, the build is seem to by success but the deploy is fail, there isn't error message. Tried set Tool->Option->Build->Diagnostic, no result. VS 2015 is pretty new, is anyone met this? How can I fix this?
I bumped into the same, but I started VS2015 as Administrator and solved the problem.
Is any Android Virtual Device running?
Open AVD menu
Launch the device
Wait for it to fully load
Build and deploy
Find your app in device's menu and execute it
Visual Studio gets stuck trying to deploy the app to the emulator or the emulator does not appear as a debug target in other IDEs
If the emulator is running, but it does not appear to be connected to ADB (Android Debug Bridge) or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB.
The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory. To modify the Android SDK path used by the emulator:
Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left.
Modify the Path registry variable to match the path to your Android SDK.
Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.
And yet another recipe of fixing this:
clean projects
remove all bin, obj folders
mark your android-project
as startup
then try to deploy again
As for me, in some cases, if visual studio stucked on project building, it requires pc reboot.
I had the same annoying issue. Going to Options -> Xamarin -> Android Setting and checking Preserve application data/cache on device between deploys solved my problem.
I was facing same issue.
Just reopen visual studio and rebuild your project..and then try to deploy.
Its worked for me!
According to Magnus Grindal Bakken's comment, I found the solution.
1) The installation must have an internet connection to be completed.
Any interruption may cause components to be excluded.
2) You need android emulator. Installing the Android SDK and Visual Studio 2015, is not sufficient, You either need the Microsoft emulator, the android one or another third party emulator (like Genymotion). You also need to ensure that the Xamarin plugins for Visual Studio are installed.
Xamarin for Visual Studio can be downloaded here. Once it is installed Visual Studio will be able to create and run Xamarin projects. Xamarin for VS includes the Xamarin Player for emulation. I think it's even better than Genymotion.
Start emulator via AVD manger ... [start] button (as user m93a suggested).
And next option contains check option "wipe user data". Check it !
It helps me solve this problem. Then deploy or debug the application and all process will works as expected.
I had the same problem with my XF App, it didn't deploy and just one message saying Deployment Failed, internal error....
I solved it. Working on Mac with Xamarin Studio, make sure that the ABI of your simulator is supported by your app.
Xamarin Studio Android project Options
Just run your Visual studio as Administrator mode.
Sometimes the physical Android device gets confused about versions.
On the device, to go settings | Applications Manager | All applications.
Manually delete your application.
Manually delete "Mono Shared Runtime" (don't worry it will reinstall during deploy)
Make any change in your project so it is seen as altered and needing to be recompiled: Add a new blank-line to a .cs file or something.
Build
Debug/deploy
I faced that problem couple hours ago, I tried to deactivate hyper-V and it worked for me.
In the Android App project Properties in Visual Studio I had to go to Android Options>Advanced and make sure the Support architectures had the architecture of my AVD checked.
In my case this was x86_64 (which, by the way, does not have a particularly discovereable method of installation - took me days).
First of all, we can find the error in "Details" when we click "Start" button on "AVD Manager" for "Android_Accelerated_x86". If the error is as follows :
Please ensure Intel HAXM is properly installed and usable. CPU
acceleration status: HAXM is not installed on this machine
So, in this case we need to install "Intel® Hardware Accelerated Execution Manager". It can be downloaded from following link :
haxm-windows_v6_0_6.zip (6.0.6)
Note: After installing Xamarin for the first time in visual studio 2015 i had the same error to run "Android_Accelerated_x86". After installing this accelerated emulator is now up and running.
If the emulator does not even lauch, maybe deploy is skipped.
You cas see this in the output console.
If so, you may have to activate the deploy by checking it in the solution's (not project) parameters.
If the emulator launches but the deploy won't end after minutes, with no error, try the steps described here : https://stackoverflow.com/a/32564067/7505268
That solved it for me.
I had Xamarin Android Player opened while trying to deploy the Android project. This steps worked for me:
Closed Xamarin Android Player
Ran Android project again
in my case I had this problem because "Solution Configuration" was set to Release. I change it back to Debug and I solve the problem
Try one of the following and see if you can get the app to deploy to your device.
Clean and build project/solution
Make sure you have updated all the NuGet packages (Right click on solution and click on Manage NuGet Packages.... Then check in Updates section whether there are any updates)
Make sure you have installed all the necessary SDKs from the Android SDK Manager
Check whether you have selected the correct project as the startup
Check if you have set the correct path for Android SDK and NDK locations
Make sure you have checked Deploy for your selected project from Build -> Configuration Manager
Well there can be many reasons,one of them could be that from the Build section in your toolbar,if you check the configuration manager there will be project names that are available in your current solution all you have to check is if the deploy checkbox is checked or not.If not kindly check it and things will work just fine
This worked for me:
Making sure that Define DEBUG constant is checked.
Using Log.Info("yourTag-AnyString", "Error before/after ");
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
Log.Info(tag, "Error before Layout");
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
//Button button = FindViewById<Button>(Resource.Id.MyButton);
//button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
Log.Info(tag, "Error before variables");
userName = FindViewById<EditText>(Resource.Id.editTextUsername);
password = FindViewById<EditText>(Resource.Id.editTextPassword);
btnInsert = FindViewById<Button>(Resource.Id.btnInsert);
Log.Info(tag, "Error after variables");
btnInsert.Click += BtnInsert_Click;
}
changing emulators or exporting the signed .apk instead
For android apps, using android device logging
There is actually a connection between running Visual Studio as administrator and setting the registry path.
I followed the instructions here but it only worked after running VS as admin because my Android SDK path is in "C:\Program Files (x86)". So in order to add or change files there you need admin rights. Alternatively you can change the permissions of the "Android" folder so that the group "Users" as full access. This worked for me as well.
Or you make sure you don't even install the Android SDK in "C:\Program Files (x86)".
By the way I found that restarting VS, or even the Emulator again wasn't necessary after I added the registry key. It picks it up when it needs to.

Unable to unpack file android-sdk-r22.6.2-windows.zip: error in opening zip file

I want to using the Android studio for develop Android apps. After I installed and run the Android studio this error displayed :
Can you help me?
Unfortunately that is because of sanctions of Google on Iranian users.
In this step Android Studio tries to download android-sdk-r22.6.2-windows.zip but instead of actual file it gets the error page in html format and then try to unzip the html and it leads to generating this error.
Best way is to use a VPN or proxy to change your IP.
We hate you Google.That's All We Know.
To solve this problem you could do this instructions step by step:
run your antifilter for example psiphone;
goto "Default Settings->appearance and settings > System Settings > HTTP Proxy" and set it auto detect proxy settings or Manual proxy configuration on the "Default Settings->appearance and settings > System Settings > Android SDK" click on Edit text;
3.Click on Next
Now your configuration will be done without error.
I had renamed my Android SDK folder due to which this problem occured. As soon as I renamed Android SDK folder back to it's original name, the Android Studio started successfully without showing this error.
This is because Android Studio was not able to find the SDK folder and it was automatically downloading a new SDK.
It happened to me too, and I live in UAE! So I don't think it's related to Iran.
What I ended up doing was just to close Android studio and re-run the setup again and everything worked normally. 🤔
I hope it helps someone out there. 😎
OS: MAC OS X El Capitan 10.11.6
You can simply download the package needed from the Google separately and install it in its default location.
During the setup wizard of Android Studio where it asks for the SDK package to be installed just click the button below and chose the destination folder which you've installed the latest SDK package.
After clicking next it will check and say your SDK is up to date and the wizard will complete.
This method works for people who have access issues regarding filtering problems of Google SDK download links during the setup.

Categories

Resources