I'm using my phone to test the application that I've been developing and I use android studio for building the app. When I tried to test the app on my phone, the app won't launch. But when I tried the built sample activity in the android studio it's working on my phone. I don't know how to fix this. I'm currently using Huawei Nova 3i.
PS: sorry for my bad English, English is not my mother tongue.
I am in android like you in English, but i would try to do teess things in your situation:
Check android event log, need to figure out the reason of app launch crash
Check your build configuration in Android Studio, may be it has any sense to change dev build to release
Check if android emulator or project libs to be compatiable with android version
That problem has many causes, If your module success configuration see manifest file you must make only one have launcher and delete android:name from it must launch successfully, But If your module didn't success configuration your must do it before.
Related
I am an intermediate Android Apps developer who uses java. Recently I tried to switch to Flutter and default app works fine debug on my cell phone through cable.
I just happened to look at Android Manifest and there are multiple error showing:
But to my surprise it shows no error on device.
I have set Flutter, dart and git path already. It would be nice if someone can help with theses errors.
This is normal since you are operating on a Flutter project, and not an Android one.
Try to Open the project from your-app-folder/android.
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 am using Android Studio and wanted to see if I could get "prints" or logs from my app, which would help later in debugging of more involved apps.
My minSDK API is 9 and targetSDK API is 22.
So, I take the simplest HelloAndroid app, and add a Log.i with an appropriate tag in the oncreate method.
I install and run this app on my Samsung phone, which has the developer options set to enable USB debugging.
The app runs fine, and I can see the system logs.w or logs.i from the various managers, but I can't find the print message I had inserted.
I had already added debuggable = true in both manifest and gradle build script as well.
So, why can't I see my own log messages.
Thanks,
Har Yash
In my case, I needed to reinstall the application on my device to see at least the logs. It seems that android studio was not running the actual version of my code...
Maybe these links could help to solve the problem in that case:
how-to-reinstall-apk
how-to-resintall-app
When I worked with Eclipse, I used Debug.waitForDebugger() to enter debug mode in hard to reach classes like services.
However, since I moved to Android Studio, I was not able to get Debug.waitForDebugger() to work.
When I add it and run the app, it does not enter debug mode at all.
Does anyone know how to make Debug.waitForDebugger() work in Android Studio?
Quoting from AOSP issue 76040 https://code.google.com/p/android/issues/detail?id=76040 -
"DDMS in Eclipse will monitor apps run on a device. When apps show up in ddms in "waiting-for-debugger" mode and the app name (its package) match the package of an app opened in the workspace, then ADT will automatically connect the debugger configured with that particular app.
We should do this in Studio as well. Probably after 1.0 though"
Up until today this problem has not been resolve yet in Android Studio.
try android.os.Debug.waitForDebugger();
Use the emulator/device entries under "Settings>Development Options" as advised here