Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

同上问题.不使用您编译好的库,直接编译jni会报错 #3

Open
duanzejiang opened this issue Nov 14, 2016 · 7 comments
Open

Comments

@duanzejiang
Copy link

报错内容如下::

11-14 16:49:49.626 14403-14478/? E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
Process: com.yuyh.inc.update, PID: 14403
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load libApkPatchLibrary from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.yuyh.inc.update-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.yuyh.inc.update-1, /vendor/lib, /system/lib]]]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:526)
at com.yyh.lib.bsdiff.DiffUtils.(DiffUtils.java:20)
at com.yyh.lib.MainActivity$DiffTask.doInBackground(MainActivity.java:157)
at com.yyh.lib.MainActivity$DiffTask.doInBackground(MainActivity.java:151)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:841) 
11-14 16:49:49.955 1133-1216/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /data/data/theme/com.yulong.android.launcher3/res/drawable-xhdpi/com_yyh_lib_mainactivity.png: open failed: ENOENT (No such file or directory)
11-14 16:49:49.956 1133-1216/? E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /data/data/theme/com.yulong.android.launcher3/res/drawable-xhdpi/com_yyh_lib_mainactivity.png: open failed: ENOENT (No such file or directory)

您知道是因为什么吗?

@smuyyh
Copy link
Owner

smuyyh commented Nov 14, 2016

编译后so库有没有生成!

@duanzejiang
Copy link
Author

我改了一些配置, 但是还是会报错, 报错如下:

W/dalvikvm: threadid=13: calling UncaughtExceptionHandler
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.yuyh.inc.update, PID: 9253
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "signal" referenced by "libApkPatchLibrary.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:371)
at java.lang.System.loadLibrary(System.java:526)
at com.yyh.lib.bsdiff.DiffUtils.(DiffUtils.java:20)
at com.yyh.lib.MainActivity$DiffTask.doInBackground(MainActivity.java:157)
at com.yyh.lib.MainActivity$DiffTask.doInBackground(MainActivity.java:151)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:841) 

这个也是编译的so没有生成吗? 是不是我的配置有问题? 需要进行一些什么样的配置呢?

@smuyyh
Copy link
Owner

smuyyh commented Nov 15, 2016

应该是。有空再试试 里面提供的so库就是我这边编译出来的,没问题

@duanzejiang
Copy link
Author

对, 用您编译好的确实没有问题. 但是自己编译的话就不行.

@liulixin1
Copy link

你好 我这也是 自己编译jni就报错 用你编译好的就没问题 编译平台 都加了

Process: com.yuyh.inc.update, PID: 19181
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:300)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:841)
Caused by: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "signal" referenced by "libApkPatchLibrary.so"...
at java.lang.Runtime.loadLibrary(Runtime.java:364)
at java.lang.System.loadLibrary(System.java:526)
at com.yyh.lib.bsdiff.DiffUtils.(DiffUtils.java:20)
at com.yyh.lib.MainActivity$DiffTask.doInBackground(MainActivity.java:149)
at com.yyh.lib.MainActivity$DiffTask.doInBackground(MainActivity.java:143)
at android.os.AsyncTask$2.call(AsyncTask.java:288)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
at java.lang.Thread.run(Thread.java:841) 

@smuyyh
Copy link
Owner

smuyyh commented Feb 24, 2017

@duanzejiang
Copy link
Author

duanzejiang commented Feb 24, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants