4

I have been investigating for 2 days. I have read a lot of things. To summarize what I read:

  • Non-NEON devices will not work with UNITY 5 builds.
  • You should set your Install Location to "Automatic or Force Internal"
  • You should set your Write Access to "Internal Only"

Along with the above ones, I also tried with these texture compression settings:

  • Don't override
  • DXT (Tegra)

Also there are two cases that I tried:

  • When I built the game from UNITY and generate an apk. It worked fine on the phone.
  • I selected "Google Android Project" and exported the unity project. After exporting, I got the /assets/bin/ folder and copy into my android project assets. With this option, it didn't work.

Phones that I tried are Sony Xperia M5 and One Plus 2. Both of them have ARM Cortex-A53 CPUs. Hence, the Non-NEON option is eliminated I think. I think that there should be another reason causing this problem.

By the way, the game works on both cases on s5, s6, s3 mini and Xperia Z1.

Thanks in advance.

Onur Demir
  • 708
  • 2
  • 13
  • 35
  • Is there anything else in the LogCat? – CaseyB Jul 22 '16 at 15:10
  • Seems kind of bizarre. Can you simply **try with some other phones**, you must have a friend or relative on hand? – Fattie Jul 22 '16 at 15:15
  • Could there be some ridiculous problem, like, you have forgot to set the Android to "developer mode"? (Google that.) We forget that all the time here! – Fattie Jul 22 '16 at 15:16
  • 1
    @JoeBlow Yeap, I have tried on other devices like s5,s6,s3 mini, Xperia Z1. All of them worked. Really awkward. I should indicate this in the question by the way. Also "developer mode" is off. – Onur Demir Jul 22 '16 at 15:46
  • @CaseB Both M5 and One Plus 2 are far away from me :( Those are the phones my friends with which I would like to test my game have, ironically. – Onur Demir Jul 22 '16 at 15:49
  • @aod Are you using any plugin? – Programmer Jul 22 '16 at 15:56
  • @Programmer in unity no. I don't know Android part. Android project is belong to another group of people. As soon as I learn, I will answer. – Onur Demir Jul 22 '16 at 16:02
  • I will be gone for hours and will be back. Anyways make sure that Open GL is set to version 2 not 3, then test on One Plus 2 device. You can set this from Unity settings. If using Android Project, add `` to the Manifest. – Programmer Jul 22 '16 at 16:11
  • "Android project is belong to another group of people" ah, you're buggered :) I'd just forget about it - blame them. Unity is used by millions and easily builds to and runs on pretty much all Androids. Don't waste another moment of your own time on it. – Fattie Jul 22 '16 at 16:46
  • @Programmer Yes. `` settings was already done. Stiil no success :( – Onur Demir Jul 26 '16 at 07:53

1 Answers1

6

A friend in the Android team found that native libraries missing after integration with fresco which is a powerful system for displaying images in Android applications. Also, there is an issue on the fresco's github page: https://github.com/facebook/fresco/issues/361

In there, a man whose nickname is kassim says that "A common issue with native libs on Android is that if one native lib is available for an abi then all your native libs need to be available for that abi, it won't fall back to a lower supporting abi, so x86_64 won't fall back to x86".

He offers putting the code below into the android section of build.gradle file:

packagingOptions {
    exclude "lib/armeabi/libbitmaps.so"
    exclude "lib/armeabi/libgifimage.so"
    exclude "lib/armeabi/libimagepipeline.so"
    exclude "lib/armeabi/libmemchunk.so"
    exclude "lib/armeabi/libwebp.so"
    exclude "lib/armeabi/libwebpimage.so"
    exclude "lib/arm64-v8a/libbitmaps.so"
    exclude "lib/arm64-v8a/libgifimage.so"
    exclude "lib/arm64-v8a/libimagepipeline.so"
    exclude "lib/arm64-v8a/libmemchunk.so"
    exclude "lib/arm64-v8a/libwebp.so"
    exclude "lib/arm64-v8a/libwebpimage.so"
    exclude "lib/x86_64/libbitmaps.so"
    exclude "lib/x86_64/libgifimage.so"
    exclude "lib/x86_64/libimagepipeline.so"
    exclude "lib/x86_64/libmemchunk.so"
    exclude "lib/x86_64/libwebp.so"
    exclude "lib/x86_64/libwebpimage.so"
}

This solved the problem.

Onur Demir
  • 708
  • 2
  • 13
  • 35
  • 2
    Another possibility is to add ndk { abiFilters "armeabi-v7a" } to build.gradle. (can also be abiFilters "armeabi-v7a", "x86" if you are including Intel. – Over17 Apr 25 '18 at 14:16