小编tot*_*ire的帖子

Android Studio E/dalvikvm:无法找到从方法.DatabaseManager引用的类'.DatabaseHelper'

您好我在运行时使用Android Studio时遇到此错误,但仅在SDK版本<= 19的设备上出现此错误.一切正常编译但我在我的databaseHelper类上出现此错误.

java.lang.NoClassDefFoundError:
Run Code Online (Sandbox Code Playgroud)

这是我的app build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion '23.0.1'
    useLibrary  'org.apache.http.legacy'

    defaultConfig {
        minSdkVersion 11
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled true
        }
    }
}



dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.google.android.gms:play-services:7.8.0'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.github.johnpersano:supertoasts:1.3.4@aar'
    compile 'com.readystatesoftware.systembartint:systembartint:1.0.3'
    compile 'com.navercorp.pulltorefresh:library:3.2.0@aar'
    compile 'com.parse.bolts:bolts-android:1.2.1'
    compile 'com.j256.ormlite:ormlite-android:4.48'
    compile 'com.j256.ormlite:ormlite-core:4.48'
}
Run Code Online (Sandbox Code Playgroud)

我的databaseHelper类扩展OrmLiteSqliteOpenHelper Everything工作正常,而我的compileSdkVersion是19岁.这是我更新的内容:

  • gradle:classpath 'com.android.tools.build:gradle:1.1.0'> 1.3.0
  • sdk版本:compileSdkVersion 19> 23
  • appcompat:com.android.support:appcompat-v7:19.0.1> 23 …

android ormlite android-studio

9
推荐指数
2
解决办法
4781
查看次数

标签 统计

android ×1

android-studio ×1

ormlite ×1