Ok. Consegui resolver.
O que fiz foi apontar a pasta da lib para JNI no build.gradle, nível app
android {
sourceSets.main {
jniLibs.srcDir 'src/main/libs'
}
}
Obrigado
Gorio
Em 10 de fevereiro de 2016 23:58, Tiago Grillo <tijgrillo@gmail.com> escreveu:
Olá,Cara manjo pouco disso mas fiz um tópico dias atrás sobre +/- isso o titulo é "Android Studio e JNI" dá uma lida lá ver se te ajuda.O pessoal do grupo me ajudou muito e resolveu meu problema (em especial o Thiago Lopes Rosa)2016-02-10 18:11 GMT-02:00 Gorio <goriofab@gmail.com>:Vou olhar assim que voltar da rua.
Antes de sair rodei o APP de exemplo de JNI do Google e funcionou perfeitamente.
Voltando farei o teste em meu APP pra ver se existe alguma incompatibilidade de versão.
Obrigado por enquanto.
Voltarei com a solução depois
Gorio
Em 10 de fev de 2016 18:01, "Marcelo Henrique" <marcelohd02@gmail.com> escreveu:--Ve se te ajuda.. caso ja tenha acessado desconsidere--2016-02-10 17:42 GMT-02:00 Gorio <goriofab@gmail.com>:Boa tarde Marcelo,Fiz isso e infelizmente não resolveu.Alguém poderia me dar o caminho das pedras, pois fiquei o dia todo hoje aqui tentando resolver isso..Atenciosamente
Gorio2016-02-10 17:24 GMT-02:00 Marcelo Henrique <marcelohd02@gmail.com>:Se voce estiver usando InstantRun, recomendo antes de cada build fazer um Clean depois tu faz Build de novo.--2016-02-10 16:29 GMT-02:00 Gorio <goriofab@gmail.com>:--Boa tarde galera,Estou seguindo o exemplo de JNI que encontrei para tentar desvendar o erro que esta ocorrendo em um outro projeto, porém até esse exemplo básico de JNI está com problema.Alguém poderia me dar uma dica onde estou falhando ?No Exemplo acima o erro é o seguinte02-10 16:24:48.910 18001-18001/jni.gorio.com.br.jniexample E/AndroidRuntime: FATAL EXCEPTION: mainProcess: jni.gorio.com.br.jniexample, PID: 18001java.lang.UnsatisfiedLinkError: No implementation found for java.lang.String jni.gorio.com.br.jniexample.MainActivity.getString() (tried Java_jni_gorio_com_br_jniexample_MainActivity_getString and Java_jni_gorio_com_br_jniexample_MainActivity_getString__)at jni.gorio.com.br.jniexample.MainActivity.getString(Native Method)at jni.gorio.com.br.jniexample.MainActivity.onCreate(MainActivity.java:15)at android.app.Activity.performCreate(Activity.java:6251)at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2403)at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2520)at android.app.ActivityThread.-wrap11(ActivityThread.java)at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1363)at android.os.Handler.dispatchMessage(Handler.java:102)at android.os.Looper.loop(Looper.java:148)at android.app.ActivityThread.main(ActivityThread.java:5466)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)Já na minha aplicação real ocorre o seguinte erro02-10 16:27:52.003 25583-25583/com.blockbit.android E/HelloC: WARNING: Could not load native library: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.blockbit.android-2/base.apk"],nativeLibraryDirectories=[/data/app/com.blockbit.android-2/lib/arm, /vendor/lib, /system/lib]]] couldn't find "libandroid_jni.so"02-10 16:27:52.003 25583-25583/com.blockbit.android E/art: No implementation found for void com.blockbit.android.JNI.getRunningConnections() (tried Java_com_blockbit_android_JNI_getRunningConnections and Java_com_blockbit_android_JNI_getRunningConnections__)02-10 16:27:52.005 25583-25583/com.blockbit.android E/AndroidRuntime: FATAL EXCEPTION: mainProcess: com.blockbit.android, PID: 25583java.lang.UnsatisfiedLinkError: No implementation found for void com.blockbit.android.JNI.getRunningConnections() (tried Java_com_blockbit_android_JNI_getRunningConnections and Java_com_blockbit_android_JNI_getRunningConnections__)at com.blockbit.android.JNI.getRunningConnections(Native Method)at com.blockbit.android.JNI.startJni(JNI.java:55)at com.blockbit.android.view.fragment.ConnectionsFragment.onCreateView(ConnectionsFragment.java:45)at android.app.Fragment.performCreateView(Fragment.java:2220)at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:973)at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1148)at android.app.BackStackRecord.run(BackStackRecord.java:793)at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1535)at android.app.FragmentManagerImpl$1.run(FragmentManager.java:482)at android.os.Handler.handleCallback(Handler.java:739)at android.os.Handler.dispatchMessage(Handler.java:95)at android.os.Looper.loop(Looper.java:148)at android.app.ActivityThread.main(ActivityThread.java:5466)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--- Marcelo Henrique -"Se não puder se destacar pelo talento, vença pelo esforço." (Dave Weinbaum)."Mate o pecado antes que ele o mate." ( Richard Baxter ).
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--- Marcelo Henrique -"Se não puder se destacar pelo talento, vença pelo esforço." (Dave Weinbaum)."Mate o pecado antes que ele o mate." ( Richard Baxter ).
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
0 comentários:
Postar um comentário