Flutter demo app doesn't work, detects problems - android

I have a problem with demo app in flutter. I don't know why but Visual Studio Code keeps detecting problems right after I create the project. I can't start the app.
I tried reinstalling VSC, Android Studio and all the extensions. Nothing works. Everything worked fine before I upgraded my RAM. Could that be the issue somehow?
problems that it detects

Open your terminal and run flutter pub get.
Also you can open pubspec.yaml and click

Related

Refresh Angular App in Android Studio Emulator after New Build

I added Cordova to an Angular Project, where I create an Angular build and populate it into the Cordova app:
ng build --prod --base-href . --output-path ./cordova/www/
I then run that app inside Android Studio so I can emulate what it'll look like on a device.
The Cordova app runs, but if I go and make updates to the Angular app and then run the build script again, the version Android Studio sees is the old version.
The only way I've found to get around this is whenever I Invalidate Caches, but that seems cumbersome and like there must be a better option.
I verified that the files inside the Cordova app are the updated build files (I checked for the version marker). I've tried stopping and starting the emulator, telling Android Studio to rebuild the app, as well as stopping and starting the app inside Android Studio.
Can someone please tell me what I'm missing? TIA.

I got stuck in creating the flutter project

I am using the Android Studio to create a new flutter project, but it just got stuck when creating the project, for hours. I don't know what to do, need help.
BTW, I am using Mac, there seems no opening with administration mode in it.
It takes Internet Connection for the first time for building the application in flutter, and other aspect also may effects like hardware configuration.
Try starting Android Studio in Administrator mode
Make sure that you have not ticked the "create project offline checkbox".
Keep the "Flutter SDK location" and "Project location" in a local path
(e.g. c:\users\xxxxxx)
I ran into similar problem on my Mac. The following was my state of my machine at the time of the problem.
I had upgraded to macOS Big Sur.
My copy of Android Studio was working before the upgrade.
My copy of flutter was installed using brew before the upgrade.
When I ran into the problem, after a bit of reading,
I uninstalled and reinstalled flutter using brew, and problem went away.
For me, I think there must have some change in directory permission settings that caused Android Studio to get stuck when creating application.

Android Studio Flutter Manifest Multiple Errors

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.

Flutter - how to debug the native android code

I have been trying to debug the native android code that is invoked through platform channel in flutter and the debugging is only in the flutter side. The execution doesn't hit the breakpoint in the native android. The application is working as expected but the debugging doesn't. I am using Android studio. Can some one please tell me how to debug the native android code ?
Breakpoints are working fine for me when using Android Studio at project/android/, on both emulator and physical device. And remember to Debug instead of Run (^D instead of ^R). Note, it did not work when opening the project from project/.
I don't think making a new android project to write the Native code for a flutter app is a good option (vivek's suggestion). There are many Flutter specific considerations you need to make on the native side, it is not just an Android app.
If you navigate to MainActivity.kt or MainActivity.java in the android studio then you can see "Open for Editing in Android Studio" on the top right.
click on that and it will open you a new window where you can easily write native code.
Well, better if you can write whole code in a new android project and test there then use that code to make flutter plugin. I think this will be faster than to edit in flutter project.
let me know what others think.
The answer given by #Marcos Boaventura to follow this blog helped fix the issue. https://medium.com/flutterpub/flutter-app-couldnt-find-libflutter-so-c95ad81cbccd
After fixing the gradle the debug is successful. Thank you #Marcos Boaventura
I had a similar problem. Debugging native code on an emulator worked, while debugging on a physical device (Zebra TC25, Android 7.1) crashed with a Fatal signal 11 (SIGSEGV). Switching from the Flutter beta channel to the Flutter stable channel fixed it for me.

Xamarin no longer debugging my app

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.

Categories

Resources