I'm using Firebase Analytics in my application and after adding that to my project I'm getting this error in logcat after application starts. I've searched for it but I found nothing to fix it and I'm not using SQLite database in my application. What is wrong?
E/System: Uncaught exception thrown by finalizer
E/System: java.lang.IllegalStateException: The database '/data/user/0/ir.aftabeshafa.shafadoc/databases/google_app_measurement_local.db' is not open.
at android.database.sqlite.SQLiteDatabase.throwIfNotOpenLocked(SQLiteDatabase.java:2185)
at android.database.sqlite.SQLiteDatabase.createSession(SQLiteDatabase.java:367)
at android.database.sqlite.SQLiteDatabase$1.initialValue(SQLiteDatabase.java:86)
at android.database.sqlite.SQLiteDatabase$1.initialValue(SQLiteDatabase.java:85)
at java.lang.ThreadLocal.setInitialValue(ThreadLocal.java:160)
at java.lang.ThreadLocal.get(ThreadLocal.java:150)
at android.database.sqlite.SQLiteDatabase.getThreadSession(SQLiteDatabase.java:361)
at android.database.sqlite.SQLiteProgram.getSession(SQLiteProgram.java:101)
at android.database.sqlite.SQLiteQuery.setLastStmt(SQLiteQuery.java:96)
at android.database.sqlite.SQLiteQuery.close(SQLiteQuery.java:111)
at android.database.sqlite.SQLiteCursor.close(SQLiteCursor.java:300)
at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:366)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:222)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:209)
at java.lang.Thread.run(Thread.java:761)
this is my app module gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25"
defaultConfig {
applicationId "ir.aftabeshafa.shafadoc"
minSdkVersion 16
targetSdkVersion 25
versionCode 19
versionName "1.2.2.0"
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.android.support:recyclerview-v7:25.0.1'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:cardview-v7:25.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-maps:9.8.0'
compile 'com.google.firebase:firebase-core:9.8.0'
apply plugin: 'com.google.gms.google-services'
}
Related
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "testing.gps_service"
minSdkVersion 11
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.volley:volley:1.0.0'
compile 'dev.dworks.libs:volleyplus:+'
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
testCompile 'junit:junit:4.12'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}
repositories
{
mavenCentral()
google()
}
apply plugin: 'kotlin-android-extensions'
-------------------------------------------------------
## I'm new to Android, currently working on FYP, as I run my project, an
error is occurred.##
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Compile with
compile 'dev.dworks.libs:volleyplus:0.1.4'
hope that will help
Use this Link for Upload Image "https://www.simplifiedcoding.net/android-upload-image-to-server/"
Error:Uncaught translation error: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: GC overhead limit exceeded
Please I'd like to know how I can fix that problem.
It happens when I tried to build signed apk.
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "xxxxxxx"
manifestPlaceholders = [manifestApplicationId: "${applicationId}",
onesignal_app_id: xxxxxxxx",
onesignal_google_project_number: "xxxxxx"]
minSdkVersion 16
targetSdkVersion 23
versionCode 2
versionName "2.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:multidex:1.0.0'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:support-v4:23.2.1'
compile 'com.onesignal:OneSignal:3.+#aar'
compile 'com.google.android.gms:play-services:9.8.0'
compile 'com.google.android.gms:play-services-analytics:9.8.0'
compile "com.google.android.gms:play-services-location:9.8.0"
compile 'com.google.firebase:firebase-core:9.6.1'
compile 'com.google.firebase:firebase-invites:9.6.1'
}
apply plugin: 'com.google.gms.google-services'
Add your android closure in your build.gradle file
dexOptions {
javaMaxHeapSize "4g"
}
Also refer below mentined solution link Extremely long build with Gradle
I am trying to build a release version of my app in Android Studio, and no matter what I try I get the error message:
Execution failed for task
'app:transformClassesWithJarMergingForRelease'. >
com.android.build.api.transform.TransformException:
java.util.zip.ZipException: duplicate entry:
com/android/volley/Request$Priority.class.
I've enabled multidex, cleaned and rebuilt my app, and nothing is working.
The following is my gradle build:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "carter.streakly"
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.0.0'
compile 'com.android.support:design:24.0.0'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile 'com.google.android.gms:play-services:9.2.1'
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.volley:volley:1.0.0'
compile 'org.jetbrains:annotations-java5:15.0'
compile 'com.android.support:support-v4:24.0.0'
compile 'com.android.support:multidex:1.0.0'
}
In build.gradle dependencies you included two libraries:
compile 'com.mcxiaoke.volley:library-aar:1.0.0'
compile 'com.android.volley:volley:1.0.0'
wherecom.mcxiaoke.volley is basically a fork of official Google library, so you should use only one of them. Please also note, that according to the mcxiaoke/android-volley READ.ME :
(...) this project is deprecated and no longer being maintained, please use official version from jCenter.
compile 'com.android.volley:volley:1.0.0'
Just downloaded Android Studio 2.1.3.Every time it gives
error: cannot resolve symbol appcompatactivity,oncreate.Further it shows message "Error:A problem occurred configuring project ':app'.
Could not download junit.jar (junit:junit:4.12)
Could not get resource 'https://jcenter.bintray.com/junit/junit/4.12/junit-4.12.jar'.
java.lang.NullPointerException (no error message)"
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.prateek.myapplication"
minSdkVersion 23
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
}
Try removing that line:
testCompile 'junit:junit:4.12'
I am getting started with Parse and Facebook SDK in Android Studio. I have integrated it successfully but while running the application I am getting the following error. Can anyone please help me with this. Thanks in advance.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/parse/AbstractQueryController$1.class
Here is my build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion '22.0.1'
defaultConfig {
applicationId "com.tanmaykulkarni.appname"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.2.0'
compile 'com.android.support:design:22.2.0'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.facebook.android:facebook-android-sdk:4.7.0'
compile 'com.parse.bolts:bolts-android:1.3.0'
compile 'com.parse:parse-android:1.12.0'
compile 'com.parse:parsefacebookutils-v4-android:1.10.4#aar'
}
You should search for AbstractQueryController to check which dependency this class includes. Then you should update you script to ensure that this class is only included once. Do it like in the following example:
testCompile('org.robolectric:robolectric:3.0') {
//exclusions due to android.jar conflict
exclude module: 'httpclient'
exclude module: 'commons-logging'
}