I have a project that is completely working on android lollipop but when I build my project in Nougat version it seems not working properly.
the process of my game is when the puzzle is finished or completed a modal will appear the way I did it is I move the game object to the last sibling like this gameObject.transform.SetAsLastSibling();. Its working completely on android lollipop but not in Nougat. Any Ideas what went wrong?
ps. my unity version is 5.6.2f1
Lollipop and Nougat operate slightly differently. Seeing as that line of code doesn't do anything platform specific, I'd be one to guess that answer lies elsewhere (Unless this is a bug).
Make sure your android JDK is up to date.
Make sure the correct platforms have been installed in your SDK manager.
Completely uninstall the app, clean, build and try again.
If your app is using permissions then in Nougat you must request these at run time.
Links:
https://docs.unity3d.com/Manual/android-GettingStarted.html
Related
[update] I finally was able to deploy our app on 4.2 using the latest toolchain. I get an error. See below after the original text.
We are looking for a long term solution to keep using recent version of Visual Studio (2019 at the time of this post) while keeping developping for old Android platforms (prior to 4.4).
Xamarin#Microsoft dropped support for Android previous to 4.4 in the Xamarin.Android release 9.2, but we cannot drop the support for our product.
Until now we keep using VS2017 for our specific android development, but the gap between VS2019 and VS2017 development environment is increasing and this is adding an increasing overhead on our day-to-day development.
Our projects are developped using a mostly common code base for a software deployed on PC, but part of this code is also part of an Android application that can run on specific devices.
For PC development which is our main activity, we want as much as possible to be able to code using the latest .NET standard and latest tools.
The Android version is an industrial software very specific to the hardware it is used on, and we cannot expect the Android OS to be updated, so we are stuck with a minimal Android version support of 4.2.2.
I already searched on SO and other forums, but didn't find any "good" long-term solution.
For information here are some of the good information I found related to this topic:
https://learn.microsoft.com/en-us/xamarin/android/release-notes/9/9.2
https://learn.microsoft.com/en-us/xamarin/android/app-fundamentals/android-api-levels?tabs=windows
Which .Net Standard version supports which Android versions?
https://github.com/xamarin/xamarin-android/blob/master/Documentation/guides/messages/xa4216.md
https://learn.microsoft.com/en-us/dotnet/standard/net-standard
Currently I think what we can do is:
1) Mainly use .NET standard libraries for the common parts of our code
2) Having very few assemblies directly using Xamarin.Android, typically only for the UI part.
Note that this is close to what we are already doing now (except that we could port more of our assemblies to .NET Standard I think).
However since we target API level 4.4 and use the application on 4.2, we may call some APIs that are not supported in 4.2, or even worse, APIs that are supported but buggy because the new Xamarin/Mono runtime does not support old Android versions. This is especially true since there is the warning XA4216: even if we can deploy and run on an older android because the manifest allows it, we cannot ensure that the OS provides all the necessary features used by the mono runtime.
At the moment the warning XA4216 is for version 4.0.3, but we see the day coming when we update VS2019 and get this warning for Android 4.2.
So is there a better solution than:
1) Keep the old VS2017/old Xamarin.Android build environment and block our day-to-day productivity to keep ensuring full compatibility with Android 4.2
2) Update our build and development environment fully to VS2019 with latest Xamarin and pray that the implementation is not bugged on older OS.
I would like to be able to go with 2 and have some insurance that everything will work fine, without having to retest the whole application each time there is an update of visual studio.
What do you think?
To ensure application stability, are we stuck with the old build system (VS2017 + old Xamarin.Android), or is it a "safe" risk to upgrade to VS2019 with latest Xamarin?
Thanks in advance for any good advice on this topic.
PS:
I pushed with solution 2: "Update our build and development environment fully to VS2019 with latest Xamarin and pray that the implementation is not bugged on older OS." to do the test locally on my PC at first.
After making necessary changes in our app so that it builds with VS2019 & latest Xamarin, I deployed to test on our Android 4.2.2 device (took me 1 whole day to fix the build errors...). I get the following error and app freezes:
W/libc ( 9196): protoent* getprotobyname(char const*)(3) is not implemented on Android.
Maybe praying was not enough... any ideas?
Go with option 2 & update your build and development environment fully to VS2019 with latest Xamarin! The implementation should not bug any older OS.
Even if it does add bugs, just test your code in QA. As for production, you can place good crash analytics on your app, and you ll be able to catch, report and fix any bugs.
For the most part, on Android the number of users using below Android 4.4 is less than 0.001% of all users. At that point, it makes more sense to implement Accessibility in your app, since that affects 1000x more users.
Using the tools below on Qt Creator 5.9.0 (Qt 5.12.3), created a simple QML game for Android devices.
SDK, JDK: jdk1.8.0_211, NDK: android-ndk-r19c, Gradle: 5.4, ADB: 1.0.40.
The game works properly on Windows, Mac, iOS and even a tablet running Android version 4.4.2, "but" on devices with higher versions of Android, say 7, 8 or 9, it stops and freezes at the middle of working!
I personally assume the issue is either related to my SDK or the code (but the strange thing is that, it works well on those many different platform mentioned above!).
What could be the reason for that problem in your points of view, please?
Thanks in advance.
The problem was hiding inside the code. A line of code was the source of the issue. I'd created a component and used its ID later on. Then removed the component for some reason but had forgotten to remove its ID too. By removing it. the issue was solved.
This may seem like a crazy requirement but I'm trying to create a Cordova application which will run without issues on an Android device with version 4.2.2.
It is to run on a Clover Station, and the Android version cannot be upgraded. Currently, the entire Clover network (separate to Google Play) has all Clover Stations installed with this version of Android, so my hands are tied.
I'm having a problem communicating via Ajax with our back end, and this does not happen when testing the app on my iPad, or my iPhone, or in a browser. I don't have a more up to date Android device to test with so I'm assuming the issue is the Android Version.
I don't know enough about Cordova to know whether you can install the Android platform for a specific version of Android. Ive read countless SO questions/answers about this .. but I confess I'm a bit lost.
Any ideas?
Thanks
This may seem like a crazy requirement but I'm trying to create a Cordova application which will run without issues on an Android device with version 4.2.2.
The following link shows that basically every cordova android platform version should support devices running Android 4.2.x out of the box:
https://cordova.apache.org/docs/en/latest/guide/platforms/android/#requirements-and-support
Run the following to check which android platform version is installed:
cordova platform ls
Perhaps if it's really old, you can try to upgrade and hope for bug fixes in cordova-android to fix your issue. You can also experiment with downgrading. To do this, you can
cordova plugin save
cordova platform rm android
cordova platform add android#5.0.0
Or whatever version you want to use.
Also make sure to install the required Android API levels in your Android Studio.
EDIT: it really was a bug in AS 3.1.1 related to D8 compiler as stated here. It's said to be fixed by now in AS 3.1.3, although I didn't check that myself.
I know it means it performing AOT compilation.
The thing is that I get a lot of reviews saying "everything was fine before the latest update, but the game is extremely slow now" from users on Android 6.0 and above. Some users report that sometimes the game can not respond to their actions for literally minutes.
Also, a few reviews said that the game is a cause their phones reboot takes a very long time saying it's "optimizing apps 1/1" and that the issue goes away when they uninstall my game from the device.
I cannot reproduce the issues on any devices I have on hand (I have no Android 6.0 unfortunately, only 5.1 phone and 7.1 tablet - the game runs smoothly on those)
I need help to figure out the cause of the problem.
What I did before the latest update (that caused the problem):
switched from AS 3.0 to 3.1 (and updated project to use a newer version of gradle - 4.4)
updated android support libraries to 26.0.1
updated Appodeal libraries to 2.1.11
updated libgdx version from 1.9.5 to 1.9.6
Also, I made a few minor changes in the game's core code, but I see no way of them causing system-wide issues, it has to be something of the above. Are there any knows issues with these versions of libraries?
i work for a phone vendor, our phone was based on Android 2.3.4_r1 GRJ22 , but when i ran the CTS , the OsVersionTest fails for the reason of not supporting 2.3.4 in test case.
how to choose the version of CTS?
Probably way too late for what you need (I only really started serious use of CTS recently), but figured I give what bit of an answer I had anyway.
As I understand it (and I could be wrong), you can download CTS for a bunch of versions of Android at
http://source.android.com/compatibility/downloads.html
I would think that the 2.3 build should work for you as I don't think minor versions prevent it from running (and that seems true in my tests).
From 4.0 on, CTS is in the Android Open Source code so you can build it yourself although I've had issues there (see https://stackoverflow.com/questions/10400938/building-working-cts-for-user-build for example) and since you are on 2.3 you can't build it anyway.