我正在尝试在我的项目中使用FFTW库。 在阅读了我接下来做的一些教程之后 - 在Android Studio,Project Structure,Dependencies中我找到了这个库。它上传的非常完美。 有些课程出现在“项目”的“外部图书馆”中。 我曾尝试使用this代码:
我的方法在第一行偶然发现 Loader.load方法(fftw3.class);
Error
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load fftw3f: findLibrary returned null
我已导入import org.bytedeco.javacpp.*;
和import static org.bytedeco.javacpp.fftw3.*;
。顺便说一下,第二次导入是强制使用的。
很明显,编译器没有看到库,因为我不知道原因。 我肯定错过了一些东西,并要求与AS进行更多的互动。
有经验的人可以提供任何一种向项目添加库的教程吗?
这就是我的build.gradle文件的样子:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.android.voicestopwatch"
minSdkVersion 14
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'org.bytedeco.javacpp-presets:fftw:3.3.4-1.1'
}
关于包括android-arm和android-x86的人工制品。我不确定我是否了解你。我真的不知道包括android-arm和android-x86在内的过程是什么意思让我这么做。
添加
后compile 'org.bytedeco.javacpp-presets:fftw:3.3.4-1.1:android-arm'
compile 'org.bytedeco.javacpp-presets:fftw:3.3.4-1.1:android-x86'
应用程序崩溃了这些日志。 由于符号的限制,我剪切了日志
com.google.android.gms.common.GooglePlayServicesUtil.zza
12-14 21:03:49.024 11090-11090/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:03:49.204 10976-10976/? E/project﹕ extsdcard==/storage/sdcard0/Android/data/com.cleanmaster.mguard/files
12-14 21:03:49.214 10976-10976/? E/project﹕ extsdcard==/storage/sdcard0/Android/data/com.cleanmaster.mguard/files
12-14 21:03:49.274 11109-11109/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:03:49.804 10976-11088/? E/dalvikvm﹕ Could not find class 'android.app.usage.UsageStatsManager', referenced from method com.cleanmaster.applocklib.b.d.H
12-14 21:03:49.814 10976-11088/? E/dalvikvm﹕ Could not find class 'android.app.usage.UsageStatsManager', referenced from method com.cleanmaster.applocklib.b.d.b
12-14 21:03:49.814 10976-11088/? E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.cleanmaster.applocklib.b.d.b
12-14 21:03:50.044 10976-10976/? E/MainEntry﹕ App Start Time : 2502ms
12-14 21:03:51.034 11162-11162/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:03:51.084 10976-11176/? E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
12-14 21:03:51.714 11162-11162/? E/dalvikvm﹕ Could not find class 'com.google.android.apps.gsa.assist.GsaVoiceInteractionSession', referenced from method com.google.android.apps.gsa.assist.GsaVoiceInteractionSession_MembersInjector.al
12-14 21:03:51.724 11162-11162/? E/dalvikvm﹕ Could not find class 'com.google.android.apps.gsa.j.d', referenced from method com.google.android.apps.gsa.j.f.al
12-14 21:03:51.974 11162-11195/? E/dalvikvm﹕ Could not find class 'android.os.UserManager', referenced from method com.google.android.gms.common.e.K
12-14 21:03:51.994 11162-11195/? E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.e.c
12-14 21:03:52.064 11162-11191/? E/dalvikvm﹕ Could not find class 'android.os.UserHandle', referenced from method com.google.android.apps.gsa.shared.util.UserHandleCompat$1.aD
12-14 21:03:52.064 11162-11191/? E/dalvikvm﹕ Could not find class 'android.os.UserManager', referenced from method com.google.android.apps.gsa.shared.util.co.cy
12-14 21:03:52.314 658-11213/? E/SQLiteLog﹕ (5) statement aborts at 1: [PRAGMA journal_mode=TRUNCATE;]
12-14 21:03:52.334 11215-11215/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:03:52.954 10949-10949/? E/dalvikvm﹕ Could not find class 'android.os.UserManager', referenced from method com.google.android.gms.icing.service.f.a
12-14 21:03:53.064 11215-11232/? E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method gqa.a
12-14 21:03:53.064 11215-11232/? E/dalvikvm﹕ Could not find class 'android.os.UserManager', referenced from method gqa.a
12-14 21:03:53.094 10949-10949/? E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.nb.a
12-14 21:03:53.104 10949-10949/? E/dalvikvm﹕ Could not find class 'android.os.UserManager', referenced from method com.google.android.gms.common.nb.p
12-14 21:03:53.184 10949-10949/? E/dalvikvm﹕ Could not find class 'com.google.android.gms.common.j.c', referenced from method com.google.android.gms.common.j.b.a
12-14 21:03:53.194 2909-2915/? E/dalvikvm﹕ No free temp registers
12-14 21:03:53.194 2909-2915/? E/dalvikvm﹕ Jit: aborting trace compilation, reverting to interpreter
12-14 21:03:53.314 10949-11229/? E/dalvikvm﹕ Could not find class 'android.os.UserHandle', referenced from method com.google.android.gms.icing.b.g.a
12-14 21:03:53.374 11215-11242/? E/SQLiteLog﹕ (5) statement aborts at 1: [PRAGMA journal_mode=TRUNCATE;]
12-14 21:03:53.444 11248-11248/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:03:53.664 10949-11229/? E/Icing﹕ Array storage bad crc 43683949 vs 4165082034
12-14 21:03:53.664 10949-11229/? E/Icing﹕ Array storage bad crc 638625992 vs 433470135
12-14 21:03:53.714 10949-11229/? E/Icing﹕ Array storage bad crc 1998651001 vs 2708843988
12-14 21:03:53.714 10949-11229/? E/Icing﹕ Trie mmap suffix failed
12-14 21:03:54.304 10949-11229/? E/Icing﹕ Lite index crc check failed: 3461100273 vs 3626299967
12-14 21:03:55.164 602-602/? E/wpa_supplicant﹕ wpa_driver_nl80211_driver_cmd: failed to issue private commands
12-14 21:03:55.324 446-13401/? E/Process﹕ Error getting pid for '0'
12-14 21:03:55.564 11306-11306/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:03:56.244 11324-11324/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:03:56.724 4100-4100/? E/AuthorizationBluetoothService﹕ Proximity feature is not enabled.
12-14 21:03:56.814 11351-11351/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:03:57.324 10949-11365/? E/dalvikvm﹕ Could not find class 'android.app.usage.UsageStatsManager', referenced from method com.google.android.gms.lockbox.LockboxService.a
12-14 21:03:57.534 11351-11351/? E/SubDex﹕ SubDex Config : .dex 2
12-14 21:03:58.614 11351-11351/? E/project﹕ extsdcard==/storage/sdcard0/Android/data/com.cleanmaster.mguard/files
12-14 21:03:58.654 11351-11351/? E/project﹕ extsdcard==/storage/sdcard0/Android/data/com.cleanmaster.mguard/files
12-14 21:03:58.654 446-456/? E/WifiService﹕ Multicaster binderDied
12-14 21:03:58.994 11351-11351/? E/dalvikvm﹕ Could not find class 'android.app.usage.UsageStatsManager', referenced from method com.cleanmaster.applocklib.b.d.H
12-14 21:03:58.994 11351-11351/? E/dalvikvm﹕ Could not find class 'android.app.usage.UsageStatsManager', referenced from method com.cleanmaster.applocklib.b.d.b
12-14 21:03:58.994 11351-11351/? E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.cleanmaster.applocklib.b.d.b
12-14 21:03:59.084 11351-11351/? E/MainEntry﹕ App Start Time : 1572ms
12-14 21:03:59.404 11351-11420/? E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.GooglePlayServicesUtil.zza
12-14 21:04:00.104 10949-11229/? E/Icing﹕ Aborting indexing of corpus messages/com.google/maxwork82%40gmail.com
12-14 21:04:00.114 10949-11229/? E/Icing﹕ Aborting indexing of corpus suggest_query
12-14 21:04:00.264 11430-11430/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:04:00.644 11430-11441/? E/dalvikvm﹕ Could not find class 'android.app.AppOpsManager', referenced from method com.google.android.gms.common.aG.a
12-14 21:04:00.654 11430-11441/? E/dalvikvm﹕ Could not find class 'android.os.UserManager', referenced from method com.google.android.gms.common.aG.a
12-14 21:04:00.894 10949-11229/? E/Icing﹕ Aborting indexing of corpus messages/com.whatsapp/WhatsApp
12-14 21:04:00.904 10949-11229/? E/Icing﹕ Aborting indexing of corpus messages/com.vkontakte.account/%D0%9C%D0%B0%D0%BA%D1%81%D0%B8%D0%BC%20%D0%93%D0%BE%D0%BB%D0%B5%D0%BD%D0%B4%D1%83%D1%85%D0%B8%D0%BD
12-14 21:04:00.904 10949-11229/? E/Icing﹕ Aborting indexing of corpus messages/com.sonyericsson.localcontacts/Phone%20contacts
12-14 21:04:00.904 10949-11229/? E/Icing﹕ Aborting indexing of corpus messages/com.facebook.auth.login/%2B79242091115
12-14 21:04:00.954 10949-11229/? E/Icing﹕ Aborting indexing of corpus messages/com.sonyericsson.updatecenter.account.default/user%40updatecenter
12-14 21:04:00.954 10949-11229/? E/Icing﹕ Aborting indexing of corpus messages/com.viber.voip/%2B79242091115
12-14 21:04:00.954 10949-11229/? E/Icing﹕ Aborting indexing of corpus messages/com.sonyericsson.sdncontacts/SDN%20contacts
12-14 21:04:21.824 658-658/? E/ctxmgr﹕ [PowerConnectionProducer]Could not write powerInfo=Plug state: 2 BatteryLevel: 0.26, status=Status{statusCode=unknown status code: 7503, resolution=null}
12-14 21:04:44.924 10828-10828/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3647)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3642)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:413)
at com.example.android.voicestopwatch.SettingsActivity.fourie(SettingsActivity.java:544)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3642)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]: 172 could not load needed library 'libfftw3f.so.3' for 'libjnifftw3.so' (load_library[1093]: Library 'libfftw3f.so.3' not found)
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:597)
at org.bytedeco.javacpp.Loader.load(Loader.java:438)
at org.bytedeco.javacpp.Loader.load(Loader.java:381)
at org.bytedeco.javacpp.fftw3.<clinit>(fftw3.java:10)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:413)
at com.example.android.voicestopwatch.SettingsActivity.fourie(SettingsActivity.java:544)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3642)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gnustl_static: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:597)
at org.bytedeco.javacpp.Loader.load(Loader.java:429)
at org.bytedeco.javacpp.Loader.load(Loader.java:381)
at org.bytedeco.javacpp.fftw3.<clinit>(fftw3.java:10)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:413)
at com.example.android.voicestopwatch.SettingsActivity.fourie(SettingsActivity.java:544)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3642)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
12-14 21:04:45.154 923-923/? E/libEGL﹕ eglSetBlobCacheFuncsANDROID resulted in an error: 0x300c
12-14 21:04:45.374 171-357/? E/overlay﹕ Failed to call ioctl MSMFB_OVERLAY_SET err=Operation not permitted
12-14 21:04:45.374 171-357/? E/overlay﹕ MdpCtrl failed to setOverlay, restoring last known good ov info
12-14 21:04:45.374 171-357/? E/overlay﹕ == Bad OVInfo is: mdp_overlay z=1 fg=0 alpha=255 mask=-1 flags=0x860000 id=-1
12-14 21:04:45.374 171-357/? E/overlay﹕ src msmfb_img w=736 h=1280 format=12 MDP_RGBA_8888
12-14 21:04:45.374 171-357/? E/overlay﹕ src_rect mdp_rect x=0 y=50 w=720 h=1230
12-14 21:04:45.374 171-357/? E/overlay﹕ dst_rect mdp_rect x=0 y=50 w=720 h=1230
12-14 21:04:45.374 171-357/? E/overlay﹕ user_data user_data cnt=8
12-14 21:04:45.374 171-357/? E/overlay﹕ i=0 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=1 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=2 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=3 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=4 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=5 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=6 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=7 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ == Last good known OVInfo is: mdp_overlay z=0 fg=0 alpha=0 mask=0 flags=0x0 id=-1
12-14 21:04:45.374 171-357/? E/overlay﹕ src msmfb_img w=0 h=0 format=0 MDP_RGB_565
12-14 21:04:45.374 171-357/? E/overlay﹕ src_rect mdp_rect x=0 y=0 w=0 h=0
12-14 21:04:45.374 171-357/? E/overlay﹕ dst_rect mdp_rect x=0 y=0 w=0 h=0
12-14 21:04:45.374 171-357/? E/overlay﹕ user_data user_data cnt=8
12-14 21:04:45.374 171-357/? E/overlay﹕ i=0 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=1 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=2 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=3 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=4 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=5 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=6 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ i=7 val=0
12-14 21:04:45.374 171-357/? E/overlay﹕ MdpCtrl Lkgo ov has id -1, will not restore
12-14 21:04:45.374 171-357/? E/overlay﹕ Ctrl commit failed set overlay
12-14 21:04:45.374 171-357/? E/overlay﹕ OverlayImpl p0 failed to commit
12-14 21:04:45.374 171-357/? E/overlay﹕ Overlay commit failed
12-14 21:04:45.374 171-357/? E/hwcomposer﹕ prepare: commit failed
12-14 21:05:13.124 11522-11522/com.example.android.voicestopwatch E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:05:18.574 11549-11549/? E/Trace﹕ error opening trace file: No such file or directory (2)
12-14 21:06:13.934 11522-11522/com.example.android.voicestopwatch E/AndroidRuntime﹕ FATAL EXCEPTION: main
java.lang.IllegalStateException: Could not execute method of the activity
at android.view.View$1.onClick(View.java:3647)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3642)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ExceptionInInitializerError
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:413)
at com.example.android.voicestopwatch.SettingsActivity.fourie(SettingsActivity.java:544)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3642)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: link_image[1891]: 172 could not load needed library 'libfftw3f.so.3' for 'libjnifftw3.so' (load_library[1093]: Library 'libfftw3f.so.3' not found)
at java.lang.Runtime.loadLibrary(Runtime.java:370)
at java.lang.System.loadLibrary(System.java:535)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:597)
at org.bytedeco.javacpp.Loader.load(Loader.java:438)
at org.bytedeco.javacpp.Loader.load(Loader.java:381)
at org.bytedeco.javacpp.fftw3.<clinit>(fftw3.java:10)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:413)
at com.example.android.voicestopwatch.SettingsActivity.fourie(SettingsActivity.java:544)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3642)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.UnsatisfiedLinkError: Couldn't load gnustl_static: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:365)
at java.lang.System.loadLibrary(System.java:535)
at org.bytedeco.javacpp.Loader.loadLibrary(Loader.java:597)
at org.bytedeco.javacpp.Loader.load(Loader.java:429)
at org.bytedeco.javacpp.Loader.load(Loader.java:381)
at org.bytedeco.javacpp.fftw3.<clinit>(fftw3.java:10)
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at org.bytedeco.javacpp.Loader.load(Loader.java:413)
at com.example.android.voicestopwatch.SettingsActivity.fourie(SettingsActivity.java:544)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at android.view.View$1.onClick(View.java:3642)
at android.view.View.performClick(View.java:4147)
at android.view.View$PerformClick.run(View.java:17161)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:4787)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
at dalvik.system.NativeStart.main(Native Method)
12-14 21:08:09.064 658-658/? E/ctxmgr﹕ [PowerConnectionProducer]Could not write powerInfo=Plug state: 2 BatteryLevel: 0.27, status=Status{statusCode=unknown status code: 7503, resolution=null}
答案 0 :(得分:0)
添加这两个依赖项应该可以解决问题:
countValue (resArray, size, stu);