I am new with dotnet MAUI, still learning while working. I am trying to build my Android Application, I use my physical Device (Android 6.0 API 23).
If I Debug or make Release the app is compiling and building without any errors and crashes and works on my other physical devices. But if I switch R8 (which I need for publishing in Google Play) it crashes. It couldn`t even load MainPage. Staying in Splash Screen and in Visual Studio 2022 Community edition I can see "Application in break mode".
I can`t fix this issue: Warrning: Missing class android.window.OnBackInvokedCallback (referenced from: android.window.OnBackInvokedCallback androidx.activity.OnBackPressedDispatcher.mOnBackInvokedCallback and 4 other contexts)
I installed latest Nuget packages and
Xamarin.AndroidX.Activity 1.6.1
Xamarin.AndroidX.Activity.Compose"1.6.1
Xamarin.AndroidX.Activity.Ktx 1.6.1
Xamarin.AndroidX.AppCompat 1.5.1.1
Xamarin.AndroidX.Core" 1.9.0.1
Xamarin.AndroidX.Legacy.Support.Core.UI" 1.0.0.16
Xamarin.AndroidX.Lifecycle.Runtime" 2.5.1.1
Xamarin.AndroidX.Navigation.Common 2.5.3
Xamarin.AndroidX.Navigation.Runtime 2.5.3
Xamarin.AndroidX.Window 1.0.0.10
Xamarin.AndroidX.Window.WindowExtensions 1.0.0.10-alpha01
But I still can`t solve this problem. I searched a lot, but had no luck to find the right solution.
If someone can help, I will be really thankfull!
Related
When I got the build from the project, the game worked fine on all Androids. But the game crashes on Android 13! And it says that the program has stopped.
First, I said that the problem might be with the SDKs. I downloaded all the new SDKs, but the problem was not solved.
Then I said that maybe the project had a problem, and I created a new project and got the same build, but the problem was still not solved.
Then I said that maybe the problem was due to the Unity version, so I downloaded the latest version of Unity and made a build with it, but the game crashed again.
Then I said that maybe Unity couldn't build correctly, so I exported the project and built it in Android Studio. First, the apk size increased, but the game crashed again!
The project builds without errors, only when I enter the player settings and other settings; in the part that wants to load the maximum API and target, it says "getting API level..." When the API is loaded, several warnings are given in Unity! I think this could be the problem, but I haven't found any way to fix these warnings. I am posting here the screenshot of these warnings and the downloaded SDKs.
I would be grateful if someone could help me to solve this problem.
I am using Unity 2021.3.8.
Try out this one:
https://www.youtube.com/watch?v=fP1moOOWhrY,
It should solve your problems.
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'm very close to giving up with Android development. I don't currently have an Android phone so I'm trying to use emulators. In Eclipse, after fixing 500000 bugs/errors I finally managed to get an emulator to launch - but it kept getting stuck on the Android loading screen (even after like 45 mins) so somebody recommended me to use Android Studio.
I downloaded this on my PC, and when I tried to run a blank activity I got this error:
When I tried to actually play around with the activity, I got a rendering error:
I saw some stuff online that said to use a downgraded Android version for the error to go away - however, I only have 2 versions as you can see and none of them are working.
I tried downloading/installing Android Studio on my laptop too and got the exact same problems. What is going on? I have spent 2 days trying to run a blank activity now and am really on the verge of just giving up. Any ideas?
EDIT: Trying out Jorge Casariego's suggestion but cannot find Open Modules when I right click
Looks like it happens because you are updated Android build tools to "24.0.0 rc1" but not update gradle build plugin to 1.3.0-beta1 version.
Make sure that you have in yourProjectFolder/build.gradle
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0-beta1' // or 1.2.3
}
And in yourProjectFolder/mainModuleName/build.gradle you have
android {
...
buildToolsVersion "24.0.0 rc1" // or 23.0.1
...
}
or as a variant use last stable versions of build tools
To downgrade your SDK, you need to download a different SDK version. To do this, you need to run the SDK Manager which is the 4th image from the right:
This will allow you to download different versions of Android, allowing you to get API 19/20/21, which should fix your issue.
I get this rendering problem all the time and I've been developing for almost 2 years now, with over 10 months on android studio. These rendering problems are only for the activity preview, which usually isn't very helpful at all anyway. If you don't have an Android device, my best suggestion would be to download the GenyMotion emulator. It is 1000x better than the built in emulator, and even has a plugin for android studio that allows you to run it from within the IDE. If you need to check how a layout works, I would recommend just running the app in the emulator, as you will get a much better idea of how things look anyway, rather than trying to approximate it with the layout previewer.
Edited 6/10/18:
The packaged emulator has been updated extensively and now performs much better. For that reason, I've removed the link to the 3rd party tool. I realize my intention at the time was to be helpful, but having a link to a 3rd party tool in a stackoverflow question seems inappropriate, especially given the reason for highlighting it is outdated.
To resolve this issue follow the following steps :
Go to your app folder under Navigation section.
Right Click -> Open Module Settings
Set Compile with SDK Version as API 22 or below (Lollipop)
Set Build version as 21.1.2
Clean + Build your Project
to use the new M preview, you'll need to also use Android Studio 1.3 Preview (from the canary channel).
I have this problem too. Because I named my App the wrong thing. It has a "-" character in the app name. Ex: Web-ViewDemo. It causes a wrong location, so android studio can't do anything totally right 100%.
In short, try to rename your app!
I upgraded to the latest android studio and as ever it breaks what was working fine before.
If I plug in my android device I can see debug in the debug monitor, it gets detected and i can select it as a device to deploy to, then I get
Waiting for device.
Target device: xxxxxxxxxxxx
and nothing else happens.. VERY frustrating. Anyone any ideas on how to resolve?
Here is the resolution:
The problem is the way i installed the newer version of Android Studio. Do not install it over your previous installation directory. Create a new directory and move over your SDK into it. This is how I resolved it.
The only error I was eventually able to get from Android Studio was if i tried to run a test I'd see
NoSuchMethodError: com.android.builder.model.AndroidArtifact.getOutputs()Ljava/util/Collection;: com.android.builder.model.AndroidArtifact.getOutputs()Ljava/util/Collection;
there has been some other posts referring to this issue. Just make sure you do a clean install and don't crap over your older version.
This issue on the AOSP bug tracker tells you what is going on. A quick fix is getting rid of builder-model-0.11.0.jar from plugins/android/lib in your Android Studio folder. A patch has already been submitted and this probably won't happen again with the next update.
This is my first time learning IBM Worklight, so please bear with me. I was following this tutorial, however i stucked in page 14, where the tutorial tell me to "run as android project" so the project will be run on android simulator.
This is the error i got :
Could not find HelloWorklightHelloWorklightAndroid.apk!
What should i do? I also have watched this video, and everything works fine in that video (no error like mine)
Thanks for your time, any help is appreciated :D
The answer is because a BUG in ADT 22. I need to upgrade the ADT to latest version and install Android Build Tools.
The way to solve this bug (and get things working )is in my another question (which share the same problem, because i use a same android sdk) :
Eclipse Juno/Android broken, the debug is wrong and gen folder not created (R error)
EDIT
After that, you probably will get CLASSNOTFOUNDEXCEPTION because (again) ADT 22, so you need to do (a little) more things in this IBM link
Clean the project and build it again it works.