Unfortunately (app) has stopped.

Hi,

I know that a lot of people asked this already but I couldn’t find a solution that worked for me. When I open my app on my phone I see the app screen for 0.5 sec and then I get the error: Unfortunately (app) has stopped and the app closes itself. How do I fix this? This is the logcat when clicking on the app (I clicked multiple times on the app and when it closed I clicked again for like 3-4 times). Btw. I don’t know why the log is this long I am using it for the first time: The easiest way to host your text I am using google play services. Hopefully someone can help…

Can someone please help?

Here is some more information:

I get this warning in the editor (maybe it has something to do with it)

WARNING:

No compatible versions of com.android.support:support-v4 required by (com.android.support:appcompat-v7:23.1.0+, com.google.android.gms:play-services-basement:9.8.0), will try using the latest version 24.0.0
UnityEngine.Debug:Log(Object)
Google.JarResolver.PlayServicesSupport:Log(String, Boolean)
Google.JarResolver.PlayServicesSupport:ResolveDependencies(Boolean)
GooglePlayServices.ResolverVer1_1:smile:oResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation)
GooglePlayServices.<DoResolution>c__AnonStorey1:<>m__0()
GooglePlayServices.ResolverVer1_1:smile:oResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:AutoResolve()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

And when it’s done building, I get this error:

FileNotFoundException: Could not load file or assembly 'UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. UnityEditor.HostView:OnGUI() ---------------------------------------- FileNotFoundException: Could not load file or assembly 'UnityEditor.iOS.Extensions.Xcode, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. Google.IOSResolver..cctor () Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Google.IOSResolver UnityEditor.HostView:OnGUI()

You’ll need to clear your logcat before you start recording. Best to do this before you start your app, then once it crashes, you’ll want to stop the logcat so you get closer to the exact error.

Your FileNotFoundException is for iOS, but since you’re doing logcat, this suggest you’re trying to do an android build, so I’m not sure what it’s looking for. (at least I think logcat is android only, but I could be wrong).

Honestly, I suggest you clear your logcat as I suggest and repost as that is going to help people with a smaller file to look through.

Also to note, you may have more success in the Android forum on Unity, located here

Thanks for your reply. I am indeed making an android app and not an iOS app

I did a logcat of my real device instead of a emulator this time and I only clicked once on the app and waited till the error came, clicked on ok and stopped the logcat. But the textfile is again really big: https://drive.google.com/file/d/0By5JyO9D8JspRElFUmZtTzlUVE0/view

Are you running logcat through the windows command prompt?

Did you clear your logcat? I believe it’s adb logcat -c
if you are doing this through command prompt.

While I don’t know exact details on logcat, I know I usually clear it and then run it so it writes to a text file right before I do whatever I want to on my device and it’s a big help. This is a major help for me in tracking down exact issues as there is a lot less to view.

Yes I am running logcat from windows cmd.
I do exactly what you are saying but I get a lot of text again: https://drive.google.com/open?id=0By5JyO9D8JspUWJVdXVaTGxHUHc

*Maybe it has something to do with this? /*

Since it’s a warning, honestly, I don’t know. It seems to suggest you’re using an older version perhaps of the support-v4 file. You may just be able to update your play service files.

Your app crashing could be just about anything. I ran into this error due to an issue in the manifest that created a problem between two plugins in our app. So it’s hard to say what could be wrong. If you’ve got a lot of plugins, you may just have to try to remove some and test again and see what happens. But this is really why I suggested the Android unity forum as they may have a better grasp on what may be wrong.

Why your logcat is so large I’m not sure as I usually get small logcats.
Only thing I see at a glance is starting here
11-10 16:16:37.516 2326 2326 E Resources: ExecutionException

The E means it’s an error and you have a large chunk of errors there, so that may be a good place to start. I’m not a logcat expert though, so I can’t say based on my knowledge what is going on right there.

I fixed it. I removed the googlemobileads, google play games, admob and other networks and renewed it and it worked. Thanks for your help :slight_smile:

Exactly what @Jip1912 said.
I couldn’t even deploy a project with a mere empty scene, so it had to be to do with Ads, IAP or GooglePlay framework that I had. I finally managed to do it by enabling/disabling them. Also, I toggled ‘ARMv7’ on and off (in ProjectSettings–player)

Here is how I’ve solved it:

  1. Went into “Services” window, then disabled in-App Purchasing. This caused lots of errors pop-in the console.

  2. Then went into Window/PluginManager and removed the IAP plugin.

  3. Back in the “Serivces” window, enabled the In-App-Purchasing, and allowed it to import the needed code. It showed a a little pop-up window, that required clicking ‘Next’ to import such new scripts at 3 different stages (had to click ‘next’ 3 times within the 2 minutes until everything imported).

  4. verified that Window/PluginManager has the IAP plugin imported.

  5. Updated all plugins in this Plugin Manager to the latest versions. For example like this: (notice it says ‘Update to’ in the lower right corner of the screenshot)

Also, I went into Project Settings->Player and unticked ‘ARMv7’ in the “Target Architectures” part.
This caused some re-import to occur, which looked liked like this:

Afterwards, ticked ARMv7, to re-enable it, causing this re-import to occur yet again.

  1. disabled “Ads” in the Services window, causing another re-import.
    Removed Ads Plugin in Plugin Manager window

  2. re-enabled “Ads” in the Services Window, allowed it to re-import, verified the Ads plugin in the Plugin Manager window was imported back.

This did the trick.