I am creating my mobile game, But I have a minor problem, I use unity 2018 and when I build my game and I have it as an apk file, I can't run it on my phone, I have the latest android and I wanted to ask if it can be an old version of unity. when I click on apk it tells me that an error occurred while checking the file. Porblem is only with samsung, on xiaomy I can normal play my game. Thank you.
We need more information about your problem
But in general, you can try to check the plugin inside the game, most of the errors that happen after build are caused either by plugin incompatibility or an xml file error
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.
I was testing the new version of Ionic framework with Capacitor as I tried to build and run my app on emulator and my device I faced this error without success in installing app
No Compatible APKs found for the device.
after lots of search and struggling to fix this and lots of fails, as I was talking to one of my friends about it I realised maybe this is related to build configuration.
as I could not find similar anywhere I decided to share the answer here maybe helps and save someone time.
No Compatible APKs found for the device.
This error appears to your Build Output when android studio cannot find the related APK file generated, so by a simple change in your buid configuration you can fix this, in my case I fixed the problem like this:
thorugh this section select:
Edit Configuration
default Deploy option under Installation option is set to
APK from app bundle
by changing it to
Default APK
you'll be able to build and run your app successfully.
I hope it help you to run your shiny app asap ;p
After I've updated android project gradle version to 3.0.0 I've faced weird issue. When I'm trying to install my app with Fabric or send *.apk via email it says "App cant be installed" but when I work directly with IDE everything is fine.
I've already spent a lots of hours browsing all known gradle 3.0.0 issues, but didn found anything.
Maybe anybody faced similar issue?
P.S. sorry, there is no match code to share, because I think its not related on configurations, cause it works via Android Studio.
Maybe anybody faced similar issue?
Yes, and I blogged about it a couple of days ago.
If you are going to distribute the APK, build the APK explicitly for that role, such as:
Using the “Build APK(s)” menu option
Using the assembleDebug or assembleRelease Gradle tasks
The APK from an IDE build now has FLAG_TEST_ONLY set, and such an APK cannot be installed normally. adb install -t will install it, but that would require the recipient to have the Android SDK.
Adding to CommonsWare answer, there is one more issue.
You might enabled Instant Run. One major drawback of this feature is, you can not use apk for other device (other than the device which you are using for development).
If so, after disabling this feature you will be able to use created apk (debug apk) to other device also (by using unknown sources option or adb option)
I create my android app via xamarin and deploy it.In this case app worked currently but when publish app and install it on emulator app crashed.
I open new project with out any code.I put a button inside main activity and then setting up such as this image and repeat publish but app installed and when running crashed.
What is problem?
I m new to Xamarin and recently i Have developed and app and Published successfully i Also had Face savarel errors on Releasing
Resons Behind Crashing The App :
There Can be Savarel Reasons of Crashing a Xamarin App After Releasing
The Default Behaviour of any Xamarin app is to throw exception on any critical error.. so We Have to Digg into Other problems rather Then Focussing on crashing App
Lets Discuss Some that I Faced ..
1.Project Release (Miss) Configuration
The Project Config Worked For me Was :
Set Project from Debug to Release Mode (Right Click on Solution).
Uncheck option "Use Fast Deploymnet"
keep "use" incremental Android Packaging System(aapt2)
Dex Compiler : whatever you like
code Shrinker: Whatever dex Compiler Support or you can keep it
Blank
Keep "Enable developer instrumentation(debugging and Profilling)"
unCheked (must)
Linking : dont keep None keep it "sdk only" or "sdk and User
Assambly"
keep Target Android Version(ANdroid Menifest) lower or Equal to
option Compile using Android version(Aplication)
2.Un-Supported Libraries in projectname.Android & Projectname.ios
-1 of the app crashing reasons is this also .. let me explain
every xamarin project installs a xamarin library by default
and it can be older version then libraries available in letest
version
Eg: i was having a plugin for Toast Notification with version 2.2.0
initiasly in my device project was working fine in Android 10 in
both release and debug mode but but but....,
it was crashing in other versions devices like 11,12,13,9,8..
because of the xamarin library version was older and not supported
new library versions in these devices
Solution : what i did was re-installed that plugin with version
2.0.0(DownGraded version) And It Worked ..!! in release and Debug
Mode..
Eg2:Installing UnNessesary Libraries to projectName.Android And
projectName.ios Projects
i had installed a library that was for only experimental perpose
and later i didn't Used any code from that library in my project
and i was facing error like : "Java.lang.ClassnotFound Exception"
in release mode and app was crashing without any reason
Solution i Removed that library from all 3 projects
.ios,.android,and .csproject it worked errors ware gone!
Installing Un-Nessessary Libraries to .Android and .Ios project
look buddy you dont need every library to be installed in .Android and
.ios Project always Sometimes if you are installing those in only
.csproject(pcl) Project ..! it is sufficiant to run code.
Note!: Try To Install As minimum number of libreries as possible
in .Android And .Ios Project
Signing The Apk After Publishing(Archiving)
One of the major Reason is not Signing Your Apk in publishing(Archiving
Process)
For This Check link: How to Prepare for Deploy And Sign xamarin APP
I am working with ccr4j API in Android so when I run my project its thrown an error like:
Error while installing application (INSTALL_FAILED_DEXOPT)
I find from net and same site also, did all trying like,
1. Uninstalled same application from device.
2. Run Emulator with Wipe User Data.
But still same error comes.
So anyone know why its thrown this kind of error?
This most likely has to do with the size of classes.dex. On anything pre-ICS dexopt will fail on anything over 5mb. Check the size of classes.dex in your apk. It would also be good to see what your method count is as dex has a 65536 method/field limit.
I have same problem. Checked classes.dex file and it is about 7mb's. I'll try to find a solution. I hope Facebook's solution solves mine too.
By the way thanks for information #Jared.
https://www.facebook.com/notes/facebook-engineering/under-the-hood-dalvik-patch-for-facebook-for-android/10151345597798920
Edit 1: I've solved this problem by using proguard optimization. My previous classes.dex file was about 7mb, and after proguard optimization it became 4mb. And now I can run this obfuscated and optimized apk on 2.2 and 2.3 devices.
Edit 2: Official Google Multi Dex support is the best solution for this issue. https://developer.android.com/tools/building/multidex.html
Find Android SDK folder. (Usually C:\User\AppData\Local\Android\sdk) Delete folders which starts with dot(.), they are temporary downloads files. Then delete Android Emulator from SDK Manager. Then run Android Studio as administrator and then download and install Android Emulator again. And make sure you have installed Intel H.A.X.M.. Now you can create emulator and use it without errors.