29

I use Android Studio and debug applications on an HTC One M8. I updated the phone to Android 5.0.1 last night.

Edit: Recently puchased a Nexus 9 and the same issue is occuring.

The first time I tried to run the app, the gradle builds without issues, but I now get a runtime error.

I've researched this issue and others seem to have got an unsatisfied link error relating to library locations. However, I've made no changes to libraries or to the code.

Android Studio will also regularly fail to deploy the debug APK saying 'No APK changes detected. Activity not started, its current task has been brought to the front' despite definite APK changes.

Why am I getting this error? Thank you for your time.

compileSdkVersion 21 buildToolsVersion "21.1.2" minSdkVersion 15 targetSdkVersion 21

Gradle file below.

02-05 10:56:30.330    6516-6524/? E/cutils-trace﹕ Error opening trace file: No such file or directory (2)
02-05 10:56:30.410    6516-6527/? E/art﹕ No implementation found for java.lang.String android.os.SystemProperties.native_get(java.lang.String) (tried Java_android_os_SystemProperties_native_1get and Java_android_os_SystemProperties_native_1get__Ljava_lang_String_2)
02-05 10:56:30.490    6516-6516/? A/art﹕ art/runtime/thread.cc:1116] No pending exception expected: java.lang.UnsatisfiedLinkError: com.htc.customization.HtcCustomizationManager
02-05 10:56:30.490    6516-6516/? A/art﹕ art/runtime/thread.cc:1116]   at boolean android.database.sqlite.SQLiteConnection.supportServo() (SQLiteConnection.java:1851)
02-05 10:56:30.490    6516-6516/? A/art﹕ art/runtime/thread.cc:1116]   at void android.database.sqlite.SQLiteConnection.<clinit>() (SQLiteConnection.java:1541)
02-05 10:56:30.490    6516-6516/? A/art﹕ art/runtime/thread.cc:1116]
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] Runtime aborting...
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] Aborting thread:
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] "main" prio=5 tid=1 Runnable
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | group="" sCount=0 dsCount=0 obj=0x75e28080 self=0xb7a902a0
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | sysTid=6516 nice=0 cgrp=apps/bg_non_interactive sched=0/0 handle=0xb6f24058
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | state=R schedstat=( 0 0 0 ) utm=16 stm=6 core=3 HZ=100
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | stack=0xbe4ad000-0xbe4af000 stackSize=8MB
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | held mutexes= "abort lock" "mutator lock"(shared held)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #00 pc 00004828  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #01 pc 00002ec5  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #02 pc 0024441d  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #03 pc 002277eb  /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+394)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #04 pc 0021a58f  /system/lib/libart.so (art::AbortState::DumpThread(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, art::Thread*)+22)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #05 pc 0021a7cd  /system/lib/libart.so (art::AbortState::Dump(std::__1::basic_ostream<char, std::__1::char_traits<char> >&)+324)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #06 pc 0021a9c1  /system/lib/libart.so (art::Runtime::Abort()+72)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #07 pc 000a5dbf  /system/lib/libart.so (art::LogMessage::~LogMessage()+1322)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #08 pc 0022821f  /system/lib/libart.so (art::Thread::AssertNoPendingException() const+374)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #09 pc 000d10b7  /system/lib/libart.so (art::ClassLinker::FindClass(art::Thread*, char const*, art::Handle<art::mirror::ClassLoader>)+30)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #10 pc 001cf97f  /system/lib/libart.so (art::JNI::FindClass(_JNIEnv*, char const*)+798)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #11 pc 0005d02b  /system/lib/libandroid_runtime.so (???)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #12 pc 00073f87  /system/lib/libandroid_runtime.so (android::register_android_database_SQLiteConnection(_JNIEnv*)+278)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #13 pc 0005cf29  /system/lib/libandroid_runtime.so (???)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #14 pc 0005e131  /system/lib/libandroid_runtime.so (android::AndroidRuntime::startReg(_JNIEnv*)+28)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #15 pc 0005e289  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, android::Vector<android::String8> const&)+304)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #16 pc 00001691  /system/bin/app_process32 (???)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #17 pc 0000f31d  /system/lib/libc.so (__libc_init+44)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #18 pc 000017ac  /system/bin/app_process32 (???)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   (no managed stack frames)
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] Pending exception java.lang.UnsatisfiedLinkError thrown by 'unknown throw location'
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] java.lang.UnsatisfiedLinkError: com.htc.customization.HtcCustomizationManager
02-05 10:56:30.570    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   at boolean android.database.sqlite.SQLiteConnection.supportServo() (SQLiteConnection.java:1851)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   at void android.database.sqlite.SQLiteConnection.<clinit>() (SQLiteConnection.java:1541)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] Dumping all threads without appropriate locks held: thread list lock
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] All threads:
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] DALVIK THREADS (11):
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284] "main" prio=5 tid=1 Runnable
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | group="" sCount=0 dsCount=0 obj=0x75e28080 self=0xb7a902a0
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | sysTid=6516 nice=0 cgrp=apps/bg_non_interactive sched=0/0 handle=0xb6f24058
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | state=R schedstat=( 0 0 0 ) utm=17 stm=6 core=3 HZ=100
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | stack=0xbe4ad000-0xbe4af000 stackSize=8MB
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   | held mutexes= "abort lock" "mutator lock"(shared held)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #00 pc 00004828  /system/lib/libbacktrace_libc++.so (UnwindCurrent::Unwind(unsigned int, ucontext*)+23)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #01 pc 00002ec5  /system/lib/libbacktrace_libc++.so (Backtrace::Unwind(unsigned int, ucontext*)+8)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #02 pc 0024441d  /system/lib/libart.so (art::DumpNativeStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&, int, char const*, art::mirror::ArtMethod*)+68)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #03 pc 002277eb  /system/lib/libart.so (art::Thread::DumpStack(std::__1::basic_ostream<char, std::__1::char_traits<char> >&) const+394)

...and many more lines like that... then...

02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   native: #05 pc 000003d3  /data/dalvik-cache/arm/system@framework@boot.oat (Java_java_lang_Object_wait__+82)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   at java.lang.Object.wait!(Native method)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   - waiting on <0x25853498> (a java.lang.Daemons$GCDaemon)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   at java.lang.Daemons$GCDaemon.run(Daemons.java:396)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   - locked <0x25853498> (a java.lang.Daemons$GCDaemon)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]   at java.lang.Thread.run(Thread.java:818)
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]
02-05 10:56:30.580    6516-6516/? A/art﹕ art/runtime/runtime.cc:284]
02-05 10:56:30.580    6516-6516/? A/libc﹕ Fatal signal 6 (SIGABRT), code -6 in tid 6516 (main)
02-05 10:56:30.690      478-478/? E/DEBUG﹕ AM write failure (32 / Broken pipe)
02-05 10:56:31.050    1009-6279/? E/SharedPreferencesImpl﹕ Couldn't create directory for SharedPreferences file shared_prefs/log_files.xml

Here is my gradle file:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.xxx.xxx"
        minSdkVersion 15
        targetSdkVersion 21
        versionCode 14
        versionName "0.2.9.1"
    }
    buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-xxx-rules.txt'
        }
    }
    packagingOptions {
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}

repositories {
    maven {
        url "https://repo.commonsware.com.s3.amazonaws.com"
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:21.0.3'
    compile 'com.google.android.gms:play-services:6.5.87'
    compile 'joda-time:joda-time:2.7'
    compile 'au.com.bytecode:opencsv:2.4'
    compile 'uk.co.chrisjenx:calligraphy:2.0.1'
    compile 'com.commonsware.cwac:wakeful:1.0.+'
}
Josh Janvrin
  • 323
  • 3
  • 9

2 Answers2

3

I would recommend following structure

|---lib/
    |---armeabi/
         /Your.so file/
    |---armeabi-v7a
       /Your.so file (same file copy here)/

enter image description here If your file structure as above,

Please try to add below code to your gradle file

sourceSets {
        main {
            jniLibs.srcDirs = ['libs']
        }
    }

        buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }

I face same problem while using biometric sensor API in Lollipop,searched a lot finally i got armeabi-v7a folder as a solution to me.

If above not solved your problem then, This problem is related to Android OS of that device,somehow it is not able to call native library, GitHub instead of solving moved to next

Google group give some alternative solutions

IshRoid
  • 3,696
  • 2
  • 26
  • 39
  • Forgive my ignorance, but where would this structure be located? And which .so file are you referencing? A search of my environment located no armeabi folder, just a few armeabi-v7a folders. – Josh Janvrin Mar 05 '15 at 09:23
  • Do you have any.so fie in your project? if yes ,then my answer about this .so file. if you don't have .so file in your project then what you have in your armeabi-v7a folder? please mention – IshRoid Mar 05 '15 at 09:45
  • To be specific, I have no armeabi-v7a folders in my project. Only the standard directories in the SDK. – Josh Janvrin Mar 10 '15 at 01:19
  • could yo please post your gradle file and folder structure? – IshRoid Mar 10 '15 at 05:01
  • gradle file posted above. However the issue occurs even with a fresh project with unmodified gradle and no added libraries. Not sure how to post folder structure. – Josh Janvrin Mar 10 '15 at 08:36
  • My folder structure is similar to your screenshot above. Inside my libs folder I have 3 .jar folders. I also have an 'External Libraries' folder which contains some jars referenced in the 'dependencies' section of the gradle file. I've added the sourceSets to the gradle file. I'll let you know how the testing goes, as this tends to be a random issue. Thanks. – Josh Janvrin Mar 10 '15 at 09:38
  • The Unsatisifed link error persists. Thanks for the suggestion, though. – Josh Janvrin Mar 13 '15 at 22:01
  • 1
    This bug is soooo annoying. I have android 5.1.1 on Huawei Ascend P7 and it's here too. Lolipop is the worst android update ever :D – Makalele Oct 06 '15 at 14:00
2

As all the logs suggest, it's an HTC Sense bug. The way Android Studio deploys a new debug APK appears to trigger this error. This post suggests an alternate launcher may alleviate the issue.

Community
  • 1
  • 1
Jeffrey Mixon
  • 12,846
  • 4
  • 32
  • 55
  • Thanks for the suggestion. I've tried alternate launchers and there is no change in behaviour. Android Studio will install the debug APK without issue, but launching it is another matter. That being said, I've recently taken to launching it straight from the phone screen. However there is another related issue that I'll add to the original question that makes this bug even more annoying. – Josh Janvrin Feb 14 '15 at 12:16