Android Studio Flutter Manifest Multiple Errors - android

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.

Related

Flutter demo app doesn't work, detects problems

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

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.

Android Studio reports "Could not identify launch activity: Default Activity not found" when building Kotlin projects

I'm trying to build an Android app using Kotlin and Anko. When I select "Run" in Android Studio I get the error:
Could not identify launch activity: Default Activity not found
Error while Launching activity
and the app does not start. I get this error with both the emulator and with a real phone.
To try and narrow down the problem I tried a couple of sample Anko projects, including android-anko-sample, and they all exhibit this same broken behavior.
I have other Android projects I've written in Java, and they run without this problem, which suggests that this is somehow a Kotlin or Anko specific issue. I can even switch back and forth between one of my Java apps and the "android-anko-sample" app linked above, and reproduce the problem with android-anko-sample consistently, while my Java app works correctly every time.
I have looked at other questions involving this error message, and the solutions posted were either not applicable or didn't help.
One thing I have noticed that's weird is that when I open AndroidManifest.xml (of any of these Anko apps) in Android Studio the names of the activities are shown in red, as if they are errors. Here's how the one from android-anko-sample looks:
Note that the app does get installed on the phone/emulator, and I can tap on the icon and run it. It just won't automatically start when I select run from Android Studio, which is pretty inconvenient.
How do I fix this issue?
I'm using:
Android Studio 2.1.2
Ubuntu Linux 16.04
Oracle JDK 1.8.0_131-b11
Code is here:
https://github.com/vsouhrada/android-anko-sample
The complete contents of a few of Android Studio's panes are available in this gist:
https://gist.github.com/xenomachina/e8027b385661038c3f020a543493eebf
This was caused by not having the Kotlin plugin installed in Android Studio.
To fix, go to File → Settings → Plugins → Browse Repositories, find "Kotlin", and install it.

Android sendBroadcastAsUser() UserHandle.USER_CURRENT error

I am rebuilding an Android app for which I've the source code from the OEM. Normally, the app can be using the make command in command line and that works. The app's UI, manifest etc. is done in Eclipse. But Eclipse can't compile the app, and gives error on the line shown below and does't recognize the item USER_CURRENT.
sendBroadcastAsUser(exampleIntent, new UserHandle(UserHandle.USER_CURRENT));
Does anyone know how can I build and run the app from Eclipse?
Btw, I build my own system image for the platform using Android 4.4.2.
Thanks.
I used
android.os.Process.myUserHandle()
to get UserHandle instance.

Categories

Resources