This is my first app publication. The project is working fine in the development side, but I am facing a problem during signing APK.
Included library in the app of com.1gravity:android-contactpicker
and facing problem during signing apk only.
error coming
Error:(30, 44) error: package com.onegravity.contactpicker.contact
does not exist
and
Generate Signed APK: Errors while building APK. You can find the
errors in the 'Messages' view.
gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId 'com.mymatatu'
minSdkVersion 15
targetSdkVersion 25
versionCode 3
versionName "1.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
debugCompile project(':library')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
compile 'com.github.markushi:circlebutton:1.1'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
}
in your gradle file change this
debugCompile project(':library')
line into
compile project(':library')
Related
i try run my application but suddenly arise this error
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
then i try searching and try that solution but all solution is not worked
help me :(
here is my .gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '26.0.2'
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
defaultConfig {
applicationId 'com.inhatc.jh.yourplaylist'
minSdkVersion 20
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/jaudiotagger-2.2.4-SNAPSHOT.jar')
compile files('libs/glide-3.4.0.jar')
compile files('libs/google-api-services-youtube-v3-rev183-1.22.0.jar')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.google.android.gms:play-services-auth:10.0.1'
// Google Api Client library and Android extension
compile 'com.google.api-client:google-api-client-android:1.22.0'
// Change to the API you want to access:
// Below is just an example for People REST API access
compile 'com.google.apis:google-api-services-people:v1-rev4-1.22.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
today solved my problem
i miss lib/.jar files and .gradle dependencies
Just installed Android Studio for the first time on this new machine and was trying to import a project that used to work without any errors a year ago on another machine.
Had to fix plenty of errors by just downloading and installing updates (recommendations).
The one error that's left is in the title.
This is my build.gradle source:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
repositories {
mavenCentral()
}
defaultConfig {
applicationId "com.test.testaa"
vectorDrawables.useSupportLibrary = true
minSdkVersion 19
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.2.0'
compile 'com.google.android.gms:play-services:9.6.1'
compile 'eu.the4thfloor.volley:com.android.volley:2015.05.28'
testCompile 'junit:junit:4.12'
}
When I'm trying to build my app it's building process is stopped showing the following message in logcat it's showing error
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/lucasr/twowayview/BuildConfig.class
My build.gradle file is
android {
compileSdkVersion 25
buildToolsVersion '26.0.1'
defaultConfig {
applicationId "community.infinity"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:support-v4:25.3.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.adamstyrc.cookiecutter:cookie-cutter:1.0.2'
compile 'com.allattentionhere:fabulousfilter:0.0.3'
compile 'com.github.florent37:diagonallayout:1.0.6'
compile 'com.flaviofaria:kenburnsview:1.0.7'
compile 'com.github.developer-shivam:FeaturedRecyclerView:1.0.0'
compile 'com.xujinyang.BiuEditText:library:1.4.1'
compile 'com.vstechlab.easyfonts:easyfonts:1.0.0'
compile 'gun0912.ted:tedbottompicker:1.0.12'
compile 'com.github.nkzawa:socket.io-client:0.5.2'
compile group: 'com.google.code.gson', name: 'gson', version: '2.3.1'
compile 'org.lucasr.twowayview:twowayview:0.1.4'
compile 'org.lucasr.twowayview:core:1.0.0-SNAPSHOT#aar'
compile 'org.lucasr.twowayview:layouts:1.0.0-SNAPSHOT#aar'
compile 'com.android.support:multidex:1.0.1'
testCompile 'junit:junit:4.12'
}
You are using the SNAPSHOT version :
compile 'org.lucasr.twowayview:core:1.0.0-SNAPSHOT#aar'
compile 'org.lucasr.twowayview:layouts:1.0.0-SNAPSHOT#aar'
and the STABLE version both at the same time
compile 'org.lucasr.twowayview:twowayview:0.1.4'
Try removing any of them. You should only use one at a time.
Visit:
https://github.com/lucasr/twoway-view
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.****"
minSdkVersion 21
targetSdkVersion 25
versionCode 30
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
signingConfig signingConfigs.config
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
repositories {
maven { url "https://dl.bintray.com/hani-momanii/maven" }
mavenCentral()
jcenter()
maven { url "https://jitpack.io" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.android.gms:play-services-maps:9.6.1'
compile 'com.google.android.gms:play-services-location:9.6.1'
compile 'com.android.support:support-vector-drawable:25.0.0'
compile 'hani.momanii.supernova_emoji_library:supernova-emoji-library:0.0.2'
compile 'com.google.maps.android:android-maps-utils:0.5'
compile 'com.googlecode.libphonenumber:libphonenumber:7.0.4'
compile 'com.github.siyamed:android-shape-imageview:0.9.+#aar'
compile 'com.theartofdev.edmodo:android-image-cropper:2.2.0'
compile 'com.facebook.android:facebook-android-sdk:4.+'
compile 'org.fusesource.mqtt-client:mqtt-client:1.12'
compile 'com.google.firebase:firebase-messaging:9.6.1'
compile 'com.squareup.okhttp3:okhttp:3.4.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.android.support.test.espresso:espresso-core:2.2.2'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I want to use minifyEnabled true and try to generate signed Apk but getting error
Warning:Exception while processing task java.io.FileNotFoundException:
\app\build\intermediates\proguard-rules\release\aapt_rules.txt (The
system cannot find the path specified).
What should I do to avoid this error?
build Clean project.
Go to Android Studio -> File -> Invalidate caches/ Restart
Android Studio "Build" - "Clean project" and the error message should not appear again.
how can i avoid or remove rendering problem warning permanently
i am using Android Studio 2.2.3.
i m getting rendering problems in most of my XML files
and my layout files not show any of my controls or design
guys help me to solve this problem
and if possible , try to tell me how can i permanently block these warning.
this is my gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion '25.0.2'
defaultConfig {
applicationId "design.ray.com.finalproject"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.3.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
// compile 'com.android.support:cardview-v7:25.0.1'
compile 'com.android.support:palette-v7:25.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile 'com.github.bumptech.glide:glide:3.7.0'
//compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.android.support:recyclerview-v7:25.2.0'
testCompile 'junit:junit:4.12'
}
You can suppress the warnings on Android Studio.
Analyze > Inspect Code find the warning the you want to suppress and click it then Alt+Enter find suppress warning on the menu.