Android Unsatisfied Link Error with Pocket Sphinx -
i'm getting unsatisfied link error
in asynctask doinbackground
method. i've done bit of research, , seems gets error messing in android ndk. i'm using third party library called pocketsphinx
haven't had mess ndk @ all. how come i'm getting error?
here error:
fatal exception: asynctask #1 process: fr.tvbarthel.games.chasewhisply, pid: 22304 java.lang.runtimeexception: error occurred while executing doinbackground() @ android.os.asynctask$3.done(asynctask.java:309) @ java.util.concurrent.futuretask.finishcompletion(futuretask.java:354) @ java.util.concurrent.futuretask.setexception(futuretask.java:223) @ java.util.concurrent.futuretask.run(futuretask.java:242) @ android.os.asynctask$serialexecutor$1.run(asynctask.java:234) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1113) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:588) @ java.lang.thread.run(thread.java:818) caused by: java.lang.unsatisfiedlinkerror: com.android.tools.fd.runtime.incrementalclassloader$delegateclassloader[dexpathlist[[dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-support-annotations-24.2.0_eab48403ac91a1482086a437a891c467c02a8655-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_9-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_8-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_7-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_6-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_5-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_4-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_3-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_2-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_1-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-slice_0-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-pocketsphinx-android-5prealpha-nolib_04ad45026efd8df9bba8dff935eb8bb91a2820d9-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-library-2.4.0_52ddc41d753f7a07db2405d0585cefbed932cc49-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-internal_impl-24.2.0_b6e1396bc2afeb25dc6fa9a5a32673830d1955c4-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-internal_impl-24.2.0_a66e98338b0c6c83a42c414e6aad64e64a2d66dc-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-internal_impl-24.2.0_830c2f91b22bcd7534d43f134a4a72d3ba734fef-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-internal_impl-24.2.0_64c0dff23bdb8b8496807610b026274dbc7e94c1-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-internal_impl-24.2.0_47b57223bb396e6ca2dce0755daf4a5389167e81-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-com.google.android.gms-play-services-4.3.23_0890364ef8f99fb395bfe174fe1a829b1a54ab63-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-com.android.support-support-v4-24.2.0_218b69aab748cb26784534005e4392fe1f774581-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-com.android.support-support-media-compat-24.2.0_9ca84d65b8a4f2912ff6ee9167099802869b1c88-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-com.android.support-support-fragment-24.2.0_ef5bfc7a750e8c7cc586a3f17a322d4434077fe5-classes.dex", dex file "/data/data/fr.tvbarthel.games.chasewhisply/files/instant-run/dex/slice-com.android.support-support-core-utils-24.2.0_cfa9f678f7dba50890bb4bb8cda71ed4b36ef86d-classes.dex", dex file "/data/data/fr.tvbar
here code
public class pocketsphinx implements recognitionlistener { private static final string menu_search = "menu"; private speechrecognizer recognizer; private voicelistener voicelistener; public pocketsphinx(context context) { runrecognizersetup(context); } public void startlistening() { recognizer.startlistening(menu_search, 2000); } public void stoplistening() { recognizer.stop(); } public void runrecognizersetup(final context context) { // recognizer initialization time-consuming , involves io, // execute in async task new asynctask<void, void, exception>() { @override protected exception doinbackground(void... params) { try { assets assets = new assets(context); file assetdir = assets.syncassets(); setuprecognizer(assetdir); log.d("pocket sphinx", "set done correctly"); } catch (ioexception e) { return e; } return null; } @override protected void onpostexecute(exception e) { super.onpostexecute(e); startlistening(); } }.execute(); } private void setuprecognizer(file assetsdir) throws ioexception { // recognizer can configured perform multiple searches // of different kind , switch between them recognizer = speechrecognizersetup.defaultsetup() .setacousticmodel(new file(assetsdir, "en-us-ptm")) .setdictionary(new file(assetsdir, "cmudict-en-us.dict")) .setrawlogdir(assetsdir) // disable logging of raw audio comment out call (takes lot of space on device) .setkeywordthreshold(1e-45f) // threshold tune keyphrase balance between false alarms , misses .setboolean("-allphone_ci", true) // use context-independent phonetic search, context-dependent slow mobile .getrecognizer(); recognizer.addlistener(this); file grammar = new file(assetsdir, "npd3.gram"); recognizer.addgrammarsearch(menu_search, grammar); } }
this issue instant run may masking more meaningful errors. can disable instant run in preferences
Comments
Post a Comment