I recently integrated Playscape SDK and android play services into my Unity (4.5.5) project. Build process for android run without any errors, however when I try to run the app on a device, black screen is shown (no Unity splash screen) and app is closed after few seconds.
Using android DDMS I get this error on top:
E/CRASH(24508): java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/analytics/GoogleAnalytics;
What could the cause be?
your IDE is not able to find the class in the GoogleAnalytics make sure you include the libraries
If you're using Android Studio, you should check the build.gradle file and see the dependencies list to ensure all the libraries you're using are declared there. After that sync gradle. Then Clean Build your project. See if that works.
Related
After updating my project to Xamarin Forms 5.0 I cant run it on my phone. I tried a blank Xamarin Forms 5.0 project and it worked, but my real project prints "Deployment was successful to [Device]" but nothing happends. It installs the app but it is corrupted or something, because the app is not visible on home screen, but exists in "settings > app" with no icon (and the size 154mb as it should be)
I have no idea what causes this and have tried everything to make it run on my phone. When archiving it I get "Cannot create archive file because the copy of mdbs files failed"
I get no compile errors when I press Build -> Build solution
I have tried deleting the app via adb/system and reinstalling it via vs.
I have tried removing the obj and bin folders and rebuilding.
I have tried rebooting and reinstalling android sdk.
I have tried restarting the android abs server
My phone is android-28 and the minsdk is 21, targetsdk is 29
(Xamarin.Forms v5.0.0.1874, Xamarin.Essentials v1.6.0, Visual Studio 2019 v16.8.4)
full build log when trying to debug: https://pastebin.com/dgqQvh24
1>Deployment was successful to [DEVICE].
This issue was caused by an invalid AndroidManifest.xml file. Simply removing a duplicate tag caused the build to succeed. For some reason xamarin forms 4.8 ignored this in the building process, but xamarin forms 5 "Failed to parse Activity Name" because of the duplicate tag.
For anyone expericing this issue just fix the AndroidManifest.xml
So I was just making a toy app to test capturing photos and video for an app at work. I set up everything in a standard fashion, make a small activity and when I try to use the 'Run' command in android studio to install on my device, I get the following error:
11/28 11:14:32: Launching 'app' on Unknown Device.
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_NO_CERTIFICATES
APK signature verification failed.
Retry
I tried searching google as to why this might happen, but I only found things concerning the generation of a signed apk and usually in a release build. I have done no signing configs on this project. It's basically a standard Android Studio generated project. Here's a screenshot of my gradle file:
module-gradle-file
Has anyone encountered this problem? I'm using Android Studio 3.5, gradle 5.4.1 and gradle plugin 3.5.0
UPDATE
So, I decided to just restart the adb server and it worked. The question of why this happened, though, remains
I downloaded ARCore project and edited the project to run on older devices than Android 7.0 by following some online tutorial that simply editing the manifest file minsdkversion. Then I decompiled the code and signed it with my own debug keys. But all I see is a project without gradle and I am confused with everything at this point.Here is a screenshot of my whole project and gradle settings.
And when I try to run the project, I get this.
So my question is, where is Gradle file? Has anyone tried it and run into this kind of issues?
Do know for grale, but the error you get is the TestRunner, that runs the unit tests, this is not the main application launcher.
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 having this problem while running my application in emulator.When I run application it shows in console this error:
[ERROR]Error reading data file
and then nothing happens.Don't know what can be the issue, tried it many ways deleting all virtual AVDs and cleaning up the project again and again but not working anyway any solution for that? I am using 2.1.1 titanium SDK and android V8 (2.2).
sometime this also show this error in console:
[ERROR]No building apps, No launcher activity.
Did the application run before?
Have you tried a clean build or deleting the build directory to perform a full rebuild? You can also have a look into the logcat provided by DDMS to search helpful information.