[jnigen] closes https://github.com/dart-lang/jnigen/issues/280 (https://github.com/dart-lang/jnigen/issues/281)
diff --git a/pkgs/jni/example/android/build.gradle b/pkgs/jni/example/android/build.gradle index 83ae220..3cdaac9 100644 --- a/pkgs/jni/example/android/build.gradle +++ b/pkgs/jni/example/android/build.gradle
@@ -26,6 +26,6 @@ project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir }
diff --git a/pkgs/jni/lib/src/util/jlist.dart b/pkgs/jni/lib/src/util/jlist.dart index 577ef89..eac7f20 100644 --- a/pkgs/jni/lib/src/util/jlist.dart +++ b/pkgs/jni/lib/src/util/jlist.dart
@@ -112,8 +112,8 @@ .getMethodIDOf(_class.reference, r"add", r"(Ljava/lang/Object;)Z"); @override void add($E element) { - Jni.accessors.callMethodWithArgs( - reference, _addId, JniCallType.voidType, [element.reference]).check(); + Jni.accessors.callMethodWithArgs(reference, _addId, JniCallType.booleanType, + [element.reference]).check(); } static final _collectionClass = Jni.findJClass("java/util/Collection");