From 5cf3af79aa39568f604838cd666bfea8b069c27b Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 22 May 2019 16:48:23 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 14 ++++++++++++++ app/build.gradle | 10 ++-------- 2 files changed, 16 insertions(+), 8 deletions(-) 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' }