Backendless.initapp崩溃

时间:2018-06-09 20:25:21

标签: build.gradle backendless

我的应用程序在此行上的Backendless.initapp崩溃了:

Backendless.initApp(this, "8B896105-6244-894C-FF80-9C8045E66600", "D07AC071-C614-2A0D-FF05-E36C6C98B700");

我正在使用instantApp功能,我的功能Gradle模块如下所示:

apply plugin: 'com.android.feature'

android {
    compileSdkVersion 27
    defaultConfig {
        minSdkVersion 15
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
        }
    }

    lintOptions {
        disable 'InvalidPackage', 'RtlCompat'
        abortOnError false
    }

    defaultConfig {
        multiDexEnabled true
    }

    dexOptions {
        javaMaxHeapSize "3g" //specify the heap size for the dex process
    }
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation group: 'com.backendless', name: 'backendless', version: '5.0.0'

    // required for real-time database and real-time messaging
    implementation ('io.socket:socket.io-client:1.0.0') {
        // excluding org.json which is provided by Android
        exclude group: 'org.json', module: 'json'
    }
        implementation project(':base')
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

}

我可以确认我确实安装了Backendless SDK。我怀疑它可能是一个定位版本问题,因为该示例针对SDK版本26。

以下是崩溃日志:

引起:java.lang.IllegalStateException:java.lang.reflect.InvocationTargetException     在android.os.Parcel.readException(Parcel.java:1607)     在android.os.Parcel.readException(Parcel.java:1552)     在com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.readReply(PG:2)     在com.google.android.instantapps.supervisor.ipc.base.MethodInvocationProxy.invoke(PG:17)     在java.lang.reflect.Proxy.invoke(Proxy.java:393)     在$ Proxy37.startService(未知来源)     在android.app.ContextImpl.startServiceCommon(ContextImpl.java:1245)     在android.app.ContextImpl.startService(ContextImpl.java:1227)     在android.content.ContextWrapper.startService(ContextWrapper.java:581)     在com.backendless.Backendless.initApp(Backendless.java:196)     在com.theswazi.hobbyist.feature.RegisterActivity.onCreate(RegisterActivity.java:38)     在android.app.Activity.performCreate(Activity.java:6309)     在android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1113)     在android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2530)     在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2665)     在android.app.ActivityThread.-wrap11(ActivityThread.java)     在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1499)     在android.os.Handler.dispatchMessage(Handler.java:111)     在android.os.Looper.loop(Looper.java:207)     在android.app.ActivityThread.main(ActivityThread.java:5771)     at java.lang.reflect.Method.invoke(Native Method)     在com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:789)     在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)

1 个答案:

答案 0 :(得分:0)

我在没有即时运行的情况下运行应用程序,它不再在Backendless.initApp崩溃。

修改 似乎Android版本6出现错误,但由于我只有一个版本6的设备,我不完全确定。我尝试了另一款安装了Android 5.1.1版本的设备。