I had my project running. And testing it on mobile device by clicking on the run button. But suddenly it has stopped working. Whenever i click on run button (run configuration is selected) it opens the dialog to choose the device but afterwards it does nothing.
Please help me with this problem. Since it has wasted my whole time.
I had the same issue. Studio project was working fine. After updateding the gradle plugin, it started showing the same issue.
Updating the Android studio to latest version only solved the problem. Looks like compatibility issue
#ShoaibAnwar Firstly Android Studio 2.0 has a security risk. http://www.androidcentral.com/google-advises-developers-upgrade-android-studio-211-over-security-concerns
You should upgrade to the latest dev release (2.1.1) in the dev channel or if you are not in a hurry, the latest stable 1.5.2. in the stable channel. (Perhaps in the future, 1.5.2 will be available in the dev channel) The run button in 2.0 won't work, instant run will not always deploy changes.
Secondly I would not mix TV and mobile modules. It is advised to separate android TV and wear modules from mobile and tablet modules. Just create 2 separate apks.
Any way to make common APK for API-15+ on mobile and API-21+ on TV?
http://tools.android.com/download/studio/builds/1-5-2/
Related
I've been working on a Xamarin project for a few days and have been testing it fine, but today it has suddenly stopped allowing me to debug the app, either via Live Player, or by connecting my smart phone via USB.
The only error I am getting, as far as I can see, is
Failed to debug your app
I've not got a way of testing it on iOS devices, but the built-in Windows Phone emulator runs the app fine, albeit with an error in my code popping up now and then.
What could be causing the Android version to stop debugging, or how do I at least fix it?
There are a couple of steps that can help with that issue:
Clean the solution and exit visual studio
manually delete the .vs folder in your solution directory
Delete the /obj and /bin folders in your shared code, and in each project for the platforms you are using
if you are developing for iOS, sometimes it helps to restart your mac
Start Visual Studio
Rebuild your shared code project
Rebuild every native project
Beyond that also make sure that you are using the latest versions of Visual Studio, Xamarin and Xamarin.Forms on all your computers, and that the nuGet Packages your project is using are at the very same version each in shared and native code
Also check, if your app isn't throwing an unexpected exception during its initialization. Especially if not caught, it can happen that your app crashes before your code gets executed at all.
In addition you may find further information about what is going on at Help -> Xamarin -> Open logs or in the device management in XCode (iOS only)
Try this :
Close visual studio if open.
Open App Data and then go to
(a) Local\Xamarin
(B) Local\Xamarin\Xamarin.Android
Empty these folders.
Open your project and then try to build your application.
Not a proper solution, but I uninstalled and reinstalled Visual Studio. This seems to have fixed the problem, but I've still no idea why it stopped working in the first place.
OK, please take it easy on me, I am new to the whole Xamarin community. I have built a simple calculator app using MVVMCross. When I run the app in an emulator everything works great. It still needs some UI attention, but functionally it all works. When I go to archive it and make an install on my phone, it installs just fine. The issue is when I go to run it. As soon as it opens I get an error message. "Calculator.UI.Droid has stopped" Open app again. I have gone through everything I can find online to do this and nothing is working.
Here is my setup:
Visual Studio 2017 Community with latest updates
Windows 10 with latest updates
Latest Java SDK
Project Properties:
Compile using Android Version 7.1 (Nougat)
Minimum Android Version 5.0
Target Android Version 7.1
Use Fast Deployment - false
Generate one package (.apk) per selected ABI - unchecked
Enable ProGuard - checked
Linking - SDK and User Assemblies
Android Phone:
Google Pixel 2 with latest updates.
Any help would be appreciative. Just let me know if you need more information. Thanks in advance
I myself are also using Xamarin, and quite often I get this problem, most times it is related to the code, so please make sure that's the case.
comment out your calculator stuff, and try running the basic app on your physical device. if that works try to find the problem, idk if you can use breakpoints because your problems happens on boot.
I create my android app via xamarin and deploy it.In this case app worked currently but when publish app and install it on emulator app crashed.
I open new project with out any code.I put a button inside main activity and then setting up such as this image and repeat publish but app installed and when running crashed.
What is problem?
I m new to Xamarin and recently i Have developed and app and Published successfully i Also had Face savarel errors on Releasing
Resons Behind Crashing The App :
There Can be Savarel Reasons of Crashing a Xamarin App After Releasing
The Default Behaviour of any Xamarin app is to throw exception on any critical error.. so We Have to Digg into Other problems rather Then Focussing on crashing App
Lets Discuss Some that I Faced ..
1.Project Release (Miss) Configuration
The Project Config Worked For me Was :
Set Project from Debug to Release Mode (Right Click on Solution).
Uncheck option "Use Fast Deploymnet"
keep "use" incremental Android Packaging System(aapt2)
Dex Compiler : whatever you like
code Shrinker: Whatever dex Compiler Support or you can keep it
Blank
Keep "Enable developer instrumentation(debugging and Profilling)"
unCheked (must)
Linking : dont keep None keep it "sdk only" or "sdk and User
Assambly"
keep Target Android Version(ANdroid Menifest) lower or Equal to
option Compile using Android version(Aplication)
2.Un-Supported Libraries in projectname.Android & Projectname.ios
-1 of the app crashing reasons is this also .. let me explain
every xamarin project installs a xamarin library by default
and it can be older version then libraries available in letest
version
Eg: i was having a plugin for Toast Notification with version 2.2.0
initiasly in my device project was working fine in Android 10 in
both release and debug mode but but but....,
it was crashing in other versions devices like 11,12,13,9,8..
because of the xamarin library version was older and not supported
new library versions in these devices
Solution : what i did was re-installed that plugin with version
2.0.0(DownGraded version) And It Worked ..!! in release and Debug
Mode..
Eg2:Installing UnNessesary Libraries to projectName.Android And
projectName.ios Projects
i had installed a library that was for only experimental perpose
and later i didn't Used any code from that library in my project
and i was facing error like : "Java.lang.ClassnotFound Exception"
in release mode and app was crashing without any reason
Solution i Removed that library from all 3 projects
.ios,.android,and .csproject it worked errors ware gone!
Installing Un-Nessessary Libraries to .Android and .Ios project
look buddy you dont need every library to be installed in .Android and
.ios Project always Sometimes if you are installing those in only
.csproject(pcl) Project ..! it is sufficiant to run code.
Note!: Try To Install As minimum number of libreries as possible
in .Android And .Ios Project
Signing The Apk After Publishing(Archiving)
One of the major Reason is not Signing Your Apk in publishing(Archiving
Process)
For This Check link: How to Prepare for Deploy And Sign xamarin APP
I am using Android Studio-1.0.1 with Genymotion virtual device emulator for app development.Of late,studio has started behaving erratically.
Whenever I make some changes in the layout or the java class files and deploy the application,it does not reflect the changes that I made.
I already tried to:
1.make/clean/build app
2.Uninstalled the app several times from the emulato
3.cleared genymotion cache,invalidated studio cache,and even deleted the build folder of my app to remove old builds,
but it still does not help.
Is there anything else that I can do to solve this problem,and what is its possible cause in the first place?
I am working with Eclipse and running my apps on my phone(Motorola DROID2 GLOBAL, Android 2.2). Once I install a new project the previous one will disappear. Any ideas? Is this Eclipse problem or the phone?
Is a normal behavior of the Android development enviroment, it remove the application that you're debugging to upload the new one (new version).
It is like when you update an application with the Market, the old one will dissapear.
The problem was related to the operating system. Once I got upgrade pushed on my phone I stopped having this issue. Now it's all works just fine and can see all my apps available.