Android Studio无法加载这样的库

时间:2015-06-12 07:23:45

标签: android-studio gradle

我为Android Studio导出ADT项目然后删除了一些错误,最后,我的应用程序在AS上启动但很快就崩溃了。

Couldn't load icu4c from loader dalvik.system.PathClassLoader...

我记得我的项目依赖于某些' .so'文件。像这样编辑gradle文件。

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
}

android {
    compileSdkVersion 18
    buildToolsVersion "22.0.1"

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
            jniLibs.srcDirs = ['libs/armeabi', 'libs/armeabi-v7a']
        }

        // Move the tests to tests/java, tests/res, etc...
        instrumentTest.setRoot('tests')

        // Move the build types to build-types/<type>
        // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ...
        // This moves them out of them default location under src/<type>/... which would
        // conflict with src/ being used by the main source set.
        // Adding new build types or product flavors should be accompanied
        // by a similar customization.
        debug.setRoot('build-types/debug')
        release.setRoot('build-types/release')
    }

    defaultConfig {
        renderscriptTargetApi 19
        renderscriptSupportModeEnabled true

        ndk {
            abiFilters "armeabi", "armeabi-v7a"
            ldLibs "libcserver", "libtest", "libicu4c"
        }
    }
}

我认为这是完全加载icu4c但是

Couldn't load icu4c from loader dalvik.system.PathClassLoader...

你有什么想法解决它吗?

0 个答案:

没有答案