diff --git a/README.md b/README.md index d5b0080e..51d0e3c8 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,20 @@ } ``` +- 扫描时报如下错误 +``` +java.lang.NullPointerException: Attempt to invoke virtual method 'com.zwy.nsfw.api.NsfwBean com.zwy.nsfw.Classifier.run(android.graphics.Bitmap)' on a null object reference +``` +__请添加__ +``` + android { + ... + aaptOptions { + noCompress "tflite" + } + } +``` + - Code like this diff --git a/app/build.gradle b/app/build.gradle index 81307ef5..81ba75ab 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -27,12 +27,6 @@ android { aaptOptions { noCompress "tflite" } -// sourceSets { -// main { -// jniLibs.srcDirs = ['libs'] -// assets.srcDir("main/assets") -// } -// } } dependencies { @@ -48,6 +42,6 @@ dependencies { implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.30' implementation 'com.github.LuckSiege.PictureSelector:picture_library:v2.2.3' - implementation project(path: ':nsfw') -// implementation 'com.github.devzwy:open_nsfw_android:1.2.4' +// implementation project(path: ':nsfw') + implementation 'com.github.devzwy:open_nsfw_android:1.2.5' }