gpt4 book ai didi

java - 重命名包破坏了 JNI 函数 Android Studio

转载 作者:太空宇宙 更新时间:2023-11-03 21:42:22 24 4
gpt4 key购买 nike

我正在使用 openCV,它工作正常,直到我更改了包名称。我搜索了 google 和 stackoverflow,但没有任何结果。已经一天了,我很沮丧。这是原木猫。任何帮助将不胜感激。

12-18 08:37:24.328 12081-12144/in.indilabz.in.cbxprint E/art: No implementation found for void in.indilabz.in.cbxprint.editor.filter.PhotoProcessing.nativeApplyFilter(int, int, long, long) (tried Java_in_indilabz_in_cbxprint_editor_filter_PhotoProcessing_nativeApplyFilter and Java_in_indilabz_in_cbxprint_editor_filter_PhotoProcessing_nativeApplyFilter__IIJJ)
12-18 08:37:24.333 12081-12144/in.indilabz.in.cbxprint E/UncaughtException: java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
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:818)
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for void in.indilabz.in.cbxprint.editor.filter.PhotoProcessing.nativeApplyFilter(int, int, long, long) (tried Java_in_indilabz_in_cbxprint_editor_filter_PhotoProcessing_nativeApplyFilter and Java_in_indilabz_in_cbxprint_editor_filter_PhotoProcessing_nativeApplyFilter__IIJJ)
at in.indilabz.in.cbxprint.editor.filter.PhotoProcessing.nativeApplyFilter(Native Method)
at in.indilabz.in.cbxprint.editor.filter.PhotoProcessing.processImage(PhotoProcessing.java:26)
at in.indilabz.in.cbxprint.editor.fragment.RecyclerMenuFragment$GetFilterThumbsTask.doInBackground(RecyclerMenuFragment.java:144)
at in.indilabz.in.cbxprint.editor.fragment.RecyclerMenuFragment$GetFilterThumbsTask.doInBackground(RecyclerMenuFragment.java:134)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
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:818) 
12-18 08:37:24.459 696-714/? E/SensorService: activeConnections...
12-18 08:37:24.459 696-714/? E/SensorService: activeConnections...
12-18 08:37:24.625 12081-12144/in.indilabz.in.cbxprint E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #3
Process: in.indilabz.in.cbxprint, PID: 12081
java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
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:818)
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for void in.indilabz.in.cbxprint.editor.filter.PhotoProcessing.nativeApplyFilter(int, int, long, long) (tried Java_in_indilabz_in_cbxprint_editor_filter_PhotoProcessing_nativeApplyFilter and Java_in_indilabz_in_cbxprint_editor_filter_PhotoProcessing_nativeApplyFilter__IIJJ)
at in.indilabz.in.cbxprint.editor.filter.PhotoProcessing.nativeApplyFilter(Native Method)
at in.indilabz.in.cbxprint.editor.filter.PhotoProcessing.processImage(PhotoProcessing.java:26)
at in.indilabz.in.cbxprint.editor.fragment.RecyclerMenuFragment$GetFilterThumbsTask.doInBackground(RecyclerMenuFragment.java:144)
at in.indilabz.in.cbxprint.editor.fragment.RecyclerMenuFragment$GetFilterThumbsTask.doInBackground(RecyclerMenuFragment.java:134)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
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:818) 

最佳答案

根据@lockcmpxchg8b 的评论,我去寻找关于 javah 的引用资料并找到了 this article我在那里找到了答案。

要解决这个问题,您需要检查 make 文件(可能位于 app/src/main/jni/Android.mk 之类的地方)。它应该包含 LOCAL_MODULELOCAL_CFLAGSLOCAL_SRC_FILES 等值。

LOCAL_SRC_FILES 会列出一些 .cpp 文件。在名称类似于 Java_old_package_name_editor_filter_PhotoProcessing_nativeApplyFilter 的文件之一中找到函数,并将 old_package_name 更改为您的新包。

关于java - 重命名包破坏了 JNI 函数 Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47861660/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com