1. 程式人生 > >bmob初始化報錯

bmob初始化報錯

  java.lang.UnsatisfiedLinkError: No implementation found for boolean cn.bmob.v3.helper.BmobNative.init(android.content.Context, java.lang.String) (tried Java_cn_bmob_v3_helper_BmobNative_init and Java_cn_bmob_v3_helper_BmobNative_init__Landroid_content_Context_2Ljava_lang_String_2)
                                                       at cn.bmob.v3.helper.BmobNative.init(Native Method)

                                                       at cn.bmob.v3.BmobWrapper.<init>(BmobWrapper.java:48)
                                                       at cn.bmob.v3.BmobWrapper.V(BmobWrapper.java:35)
                                                       at cn.bmob.v3.BmobWrapper.Code(BmobWrapper.java:28)

                                                       at cn.bmob.v3.Bmob.initialize(Bmob.java:47)
                                                       at com.panda.flashlight.MainActivity.onCreate(MainActivity.java:14)
                                                       at android.app.Activity.performCreate(Activity.java:5983)

                                                       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)
                                                       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2299)
                                                       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2408)
                                                       at android.app.ActivityThread.access$800(ActivityThread.java:144)
                                                       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321)
                                                       at android.os.Handler.dispatchMessage(Handler.java:102)
                                                       at android.os.Looper.loop(Looper.java:135)
                                                       at android.app.ActivityThread.main(ActivityThread.java:5277)
                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                       at java.lang.reflect.Method.invoke(Method.java:372)
                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:919)

                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:714)

這個 是bmob3.5在用studio會報錯的log

解決方案 在

build grdle

不用導包

allprojects {

 repositories {
     jcenter()//Bmob的maven倉庫地址--必填
     maven { url "https://raw.github.com/bmob/bmob-android-sdk/master"}}
dependencies {
    compile fileTree(dir:'libs', include:['*.jar'])//以下SDK開發者請根據需要自行選擇//bmob-sdk:Bmob的android sdk包,包含了Bmob的資料儲存、檔案等服務,以下是最新的bmob-sdk://3.5.0:請務必檢視下面註釋[1]
    compile 'cn.bmob.android:bmob-sdk:3.5.0'}
這兩個
 maven { url "https://raw.github.com/bmob/bmob-android-sdk/master"}
//3.5.0:請務必檢視下面註釋[1]
    compile 'cn.bmob.android:bmob-sdk:3.5.0'

直接貼上到對應位置 讓系統自己去關聯