IT rekvalifikace s garancí práce. Seniorní programátoři vydělávají až 160 000 Kč/měsíc a rekvalifikace je prvním krokem. Zjisti, jak na to!
Hledáme nové posily do ITnetwork týmu. Podívej se na volné pozice a přidej se do nejagilnější firmy na trhu - Více informací.
Avatar
Lukáš
Člen
Avatar
Lukáš :6.2.2017 10:07

Dobrý deň,
mám tu problém s touto časťou kódu.

private void runRecognizerSetup() {

        new AsyncTask<Void, Void, Exception>() {
            @Override
            protected Exception doInBackground(Void... params) {
                try {
                    Assets assets = new Assets(MainActivity.this);
                    File assetDir = assets.syncAssets();
                    setupRecognizer(assetDir);
                } catch (IOException e) {
                    return e;
                }
                return null;
            }

            @Override
            protected void onPostExecute(Exception result) {
                if (result != null) {
                    ((TextView) findViewById(R.id.result_text))
                            .setText("Inicializácia zlyhala " + result);
                } else {
                    switchSearch(SEARCH);
                }
            }
        }.execute();
    }

Vyhadzuje mi to tento Error v logcate a posielam teda jeho screen.

Ak by ste mi s tým vedeli pomôcť, tak predom vám zato ďakujem.

 
Odpovědět
6.2.2017 10:07
Avatar
Petr
Člen
Avatar
Odpovídá na Lukáš
Petr:6.2.2017 10:44

V kodu samotnem problem asi nebude. Neco se ti tam pousti asynchronne (v novem vlakne) uvnitr toho vlakna to padne na java.lang.Unsa­tisfiedLinkError coz je chyba, ktera se objevi pokud volas nejakou funkci z nativni knihovny (*.so na unixovych systemech, *.dll na vidlich) a knihovnu bud nenajde nebo knihovna danou funkci neobsahuje.

Reseni pro tvuj konkretni pripad ti bohuzel nedam, protoze v tom stacktracu chybi plny nazev tridy a metody. Nicmene kdyz zadas do googlu java.lang.Unsa­tisfiedLinkError: + cely nazev tridy a metody tak by jsi se mel dobrat reseni pomerne brzy.

 
Nahoru Odpovědět
6.2.2017 10:44
Avatar
Lukáš
Člen
Avatar
Lukáš :6.2.2017 10:52

Tu je výpis celej tej chyby :D priznávam nevyznám sa v nej :D

Caused by: java.lang.Unsa­tisfiedLinkError: com.android.to­ols.fd.runtime­.IncrementalClas­sLoader$Delega­teClassLoader[Dex­PathList[[dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-support-annotations-25.1.1_d0502d127­e98714274e324a­a0addaee24e576c32-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice9-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice8-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice7-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice6-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice5-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice4-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice3-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice2-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice1-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-slice0-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-jali-cmusphinx-5prealpha_dac57a13­2e7e91bab6871924951e0bff­778c41f2-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-support-vector-drawable-25.1.1_f14b4f244­617150e3500c73d4a4c2074d­abcf97f-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-support-v4-25.1.1_ff396352a­d8e64867ead56f0bac­cf803772ac3c2-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-support-media-compat-25.1.1_685389bbd­b5504e91fd96545931a4566f­5bcf3f0-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-support-fragment-25.1.1_7950a11b1­32f09b817e8b91f06c331179­18a9d91-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-support-core-utils-25.1.1_7d77b8287­4ae5201d9955bb­28371cc9e1660c75e-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-support-core-ui-25.1.1_df5103e08­a22881cb3da10dd71ef­d85243c0e9cf-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-support-compat-25.1.1_a138ab3eb­67c953ccaa4b279b38fd3­be8f2d583b-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-appcompat-v7-25.1.1_56382f132­54e09b00aeb9b67e66cfa­34155222b2-classes.dex", dex file "/data/data/com­.example.m2mso­lutions.m2m2_de­movoice/files/in­stant-run/dex/slice-com.android.support-animated-vector-drawable-25.1.1_f1860e49d­af88048fc34e93b9645fd5e­a2235b57-classes.dex"],na­tiveLibraryDi­rectories=[/ven­dor/lib64, /system/lib64, /vendor/lib64, /system/l
02-06 09:52:05.477 3930-3960/com.exam­ple.m2msoluti­ons.m2m2_demo­voice I/Process: Sending signal. PID: 3930 SIG: 9

Editováno 6.2.2017 10:52
 
Nahoru Odpovědět
6.2.2017 10:52
Avatar
wgamez101
Člen
Avatar
Odpovídá na Lukáš
wgamez101:6.2.2017 12:25

Skús vypnúť v nastaveniach Instant Run v Android Studiu. Mal by si to nájsť tu
File → Settings → Build, Execution, Deployment → Instant Run.

Nahoru Odpovědět
6.2.2017 12:25
There are only two kinds of programming languages: those people always bitch about and those nobody uses. -- Bjarne...
Avatar
Lukáš
Člen
Avatar
Lukáš :7.2.2017 14:08

Už som to vyriešil ale dík ;)

 
Nahoru Odpovědět
7.2.2017 14:08
Děláme co je v našich silách, aby byly zdejší diskuze co nejkvalitnější. Proto do nich také mohou přispívat pouze registrovaní členové. Pro zapojení do diskuze se přihlas. Pokud ještě nemáš účet, zaregistruj se, je to zdarma.

Zobrazeno 5 zpráv z 5.