Comments (6)
Might be related to minification or proguard - checking now.
from couchbase_lite.
I have a proguard script which is compatible with couchbase. When I get a chance I’ll post it on here. But yes this is a proguard issue and you have to exclude certain libraries from minification.
from couchbase_lite.
This should work for you.
## Flutter wrapper
-keep class io.flutter.app.** { *; }
-keep class io.flutter.plugin.** { *; }
-keep class io.flutter.util.** { *; }
-keep class io.flutter.view.** { *; }
-keep class io.flutter.** { *; }
-keep class io.flutter.plugins.** { *; }
# Okio
-keep class sun.misc.Unsafe { *; }
-dontwarn java.nio.file.*
-dontwarn org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement
-dontwarn okio.**
# Couchbase
-keep public class com.couchbase.lite.** { *; }
-dontwarn com.couchbase.lite.**
-keep public class com.couchbase.litecore.** { *; }
-dontwarn com.couchbase.litecore.**
from couchbase_lite.
Thanks for this @bawelter - it worked originally, but now I'm having similar issues again with my releases:
2019-10-20 19:36:11.209 17627-17627/? D/CouchBaseLite: initDatabaseWithName: Started Database Initiation
2019-10-20 19:36:11.218 3667-5428/? D/CustomFrequencyManagerService: FrequencyrequestList.getNextMaxCPUCoreRequest, index: 3
2019-10-20 19:36:11.220 17627-17627/? E/flutter: [ERROR:flutter/shell/platform/android/platform_view_android_jni.cc(39)] java.lang.NoSuchMethodError: no static method "Lcom/couchbase/litecore/C4Log;.logCallback(Ljava/lang/String;ILjava/lang/String;)V"
at com.couchbase.litecore.C4Log.setCallbackLevel(Native Method)
at d.a.a.sa.(Unknown Source:23)
at d.a.a.e.(Unknown Source:5)
at d.e.a.a.g(Unknown Source:15)
at d.e.a.d$a.onMethodCall(Unknown Source:1035)
at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(Unknown Source:17)
at io.flutter.embedding.engine.dart.DartMessenger.handleMessageFromDart(Unknown Source:57)
at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessage(Unknown Source:4)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:325)
at android.os.Looper.loop(Looper.java:142)
at android.app.ActivityThread.main(ActivityThread.java:6944)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)
2019-10-20 19:36:11.220 17627-17627/? A/flutter: [FATAL:flutter/shell/platform/android/platform_view_android_jni.cc(76)] Check failed: CheckException(env).
I've commented out proguard and minifying. Here's my build.gradle file:
def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
localPropertiesFile.withReader('UTF-8') { reader ->
localProperties.load(reader)
}
}
def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
flutterVersionCode = '1'
}
def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
flutterVersionName = '1.0'
}
apply plugin: 'com.android.application'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
def keystoreProperties = new Properties()
def keystorePropertiesFile = rootProject.file('key.properties')
if (keystorePropertiesFile.exists()) {
keystoreProperties.load(new FileInputStream(keystorePropertiesFile))
}
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
applicationId "<MY APP ID WAS HERE>"
minSdkVersion 21
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs {
release {
keyAlias keystoreProperties['keyAlias']
keyPassword keystoreProperties['keyPassword']
storeFile file(keystoreProperties['storeFile'])
storePassword keystoreProperties['storePassword']
}
}
buildTypes {
release {
signingConfig signingConfigs.release
// minifyEnabled false
// useProguard false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0'
}
Since last time my gradle.properties have been updated too. android.enableR8=true
android.enableJetifier=true
android.useAndroidX=true
org.gradle.jvmargs=-Xmx1536M
android.enableR8=true
Also updated gradle:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}
from couchbase_lite.
Ok, looks like the following was causing the issue in gradle.properties:
android.enabledR8=true
from couchbase_lite.
I’m going to close this issue since it’s a project configuration issue.
from couchbase_lite.
Related Issues (20)
- Desktop support HOT 1
- Crash on query with predicate using long attributes.
- Module compiled with Swift 5.3.2 cannot be imported by the Swift 5.5.1 compiler HOT 6
- windows support? HOT 1
- [Replicator Error: Permanent Redirect] Sync not working in iOS
- `lower` function support for Expression HOT 3
- ReplicatorType.pushAndPull data push performs but pull not performing
- GroupBy not work
- And Query is not working returning empty result. HOT 1
- Database encryption HOT 2
- Hi
- Long Problem in pullAttributeFilters
- Please consider supporting nullsafety (at least in beta channel) HOT 2
- Replicator looses connection after 2 1/2 Minutes with error 'Error: Websocket connection closed by peer' HOT 5
- How to enable verbose log HOT 1
- Unable to install HOT 2
- Out of date dependencies HOT 5
- Flutter Web Support HOT 2
- Failed to build the example app on v3.0.0-nullsafety.1 HOT 1
- null-safety migrated app crash on document change (listener) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from couchbase_lite.