Problem
When I try to build my project I get this error
Error:Execution failed for task
':app:transformClassesWithAndroidGradleClassShrinkerForDebug'.
Warnings found during shrinking, please use -dontwarn or -ignorewarnings to suppress them.
My files
app build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
dexOptions {
maxProcessCount = 2
javaMaxHeapSize = "2g"
}
dataBinding {
enabled = true
}
packagingOptions {
exclude 'META-INF/rxjava.properties'
exclude 'META-INF/SearchFilter.properties'
exclude 'META-INF/NOTICE' // will not include NOTICE file
exclude 'META-INF/LICENSE' // will not include LICENSE file
// as noted by #Vishnuvathsan you may also need to include
// variations on the file name. It depends on your dependencies.
// Some other common variations on notice and license file names
exclude 'META-INF/notice'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license'
exclude 'META-INF/license.txt'
}
defaultConfig {
applicationId "com.mt.moviesiwanttowatch"
minSdkVersion 19
targetSdkVersion 26
versionCode 4
versionName "1.2"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
minifyEnabled true
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//Optional: see how to use the utility.
implementation files('libs/YouTubeAndroidPlayerApi.jar')
implementation 'com.android.support:appcompat-v7:26.0.0-beta2'
implementation "com.android.support:support-v13:26.0.0-beta2"
implementation 'com.android.support:design:26.0.0-beta2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0-beta1'
implementation 'com.android.support:recyclerview-v7:26.0.0-beta2'
implementation 'com.android.support:cardview-v7:26.0.0-beta2'
implementation 'com.google.android.gms:play-services-analytics:11.0.2'
implementation 'com.allattentionhere:fabulousfilter:0.0.2'
implementation 'com.nightonke:boommenu:2.1.0'
implementation 'com.github.Commit451:QuickActionView:2.0.0'
implementation 'com.android.volley:volley:1.0.0'
implementation 'com.nononsenseapps:filepicker:4.1.0'
implementation 'net.simonvt.schematic:schematic:0.7.0'
implementation 'io.reactivex:rxandroid:1.2.1'
implementation 'io.reactivex:rxjava:1.3.0'
implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'
implementation 'io.reactivex.rxjava2:rxjava:2.1.1'
implementation 'com.ramotion.cardslider:card-slider:0.1.0'
implementation 'org.jsoup:jsoup:1.10.3'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.squareup.leakcanary:leakcanary-android:1.5.1'
implementation "net.dean.jraw:JRAW:0.9.0"
implementation 'com.gordonwong:material-sheet-fab:1.2.1'
implementation 'com.github.bumptech.glide:glide:4.0.0-RC1'
implementation('com.google.android:flexbox:0.3.0') {
exclude group: 'com.android.support'
}
implementation 'me.drozdzynski.library.steppers:steppers:0.4.0-SNAPSHOT'
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1#aar'
implementation 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1#aar'
implementation 'com.afollestad.material-dialogs:core:0.9.4.5'
implementation 'com.android.support:multidex:1.0.1'
implementation 'com.github.jetradarmobile.desertplaceholder:desertplaceholder:1.2.3'
implementation 'com.github.rubensousa:gravitysnaphelper:1.2'
annotationProcessor 'com.android.databinding:compiler:2.3.3'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
annotationProcessor 'net.simonvt.schematic:schematic-compiler:0.7.0'
}
project build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha6'
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com"}
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
and proguard-rules.pro
# Add project specific ProGuard rules here.
# By defaulto, the flags in this file are appended to flags specified
# in C:\Users\CM\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-keep class io.codetail.animation.arcanimator.** { *; }
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
Question
How do I modify my files to fix this problem ?
remove multiDexEnabled true, shrinkResources true, useProguard false
Change minifyEnabled true to minifyEnabled false
Hope this helps.
change buildTypes->debug->minifyEnabled=false
Related
I'm trying to use chaquopy in android studio to recognize audio from video and convert it to text, but when I call Python.getInstance() it overlines it in red. what can be the problem ?.
build.gradle(app)
plugins {
id 'com.google.gms.google-services'
//for chaquopy(python)
id 'com.android.application'
id 'com.chaquo.python'
}
android {
compileSdk 31
defaultConfig {
applicationId "com.talhakara.uzaktanegitimbitirmeprojesi"
minSdk 16
targetSdk 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// for chaquopy(python)
ndk {
abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
python {
buildPython "C:/Users/enest/AppData/Local/Programs/Python/Python39/python.exe"
}
sourceSets {
main {
python.srcDir "src/main/python"
}
}
//
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildFeatures {
viewBinding true
dataBinding true
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.1'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.3.1'
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'
implementation 'com.google.android.gms:play-services-tasks:17.2.1'
implementation 'androidx.navigation:navigation-fragment:2.3.5'
implementation 'androidx.navigation:navigation-ui:2.3.5'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation platform('com.google.firebase:firebase-bom:29.0.0')
implementation 'com.google.firebase:firebase-analytics'
implementation 'com.google.firebase:firebase-auth'
implementation 'com.google.firebase:firebase-firestore'
implementation 'com.google.firebase:firebase-storage'
implementation 'com.google.firebase:firebase-core:20.1.0'
implementation 'com.google.firebase:firebase-messaging:23.0.0'
implementation 'com.google.firebase:firebase-appindexing:20.0.0'
implementation 'com.google.firebase:firebase-invites:17.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.google.firebase:firebase-firestore:24.0.1'
implementation 'com.firebaseui:firebase-ui-auth:4.0.0'
implementation 'com.google.firebase:firebase-analytics:17.2.1'
implementation 'com.google.firebase:firebase-database:19.2.0'
implementation ('org.jitsi.react:jitsi-meet-sdk:2.9.0') { transitive = true }
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "androidx.drawerlayout:drawerlayout:1.1.1"
// implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
}
build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
//chaquopy
maven { url "https://chaquo.com/maven" }
}
dependencies {
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.gms:google-services:4.3.10'
//chaquopy
classpath "com.chaquo.python:gradle:10.0.1"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
my activity
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
binding = ActivityVideoConferenceBinding.inflate(getLayoutInflater());
View view = binding.getRoot();
setContentView(view);
//start python
if (! Python.isStarted()) {
Python.start(new AndroidPlatform(VideoConference.this));
}
Python py = new Python.getInstance(); // this line is red and
//it doesn't show any errors
binding.btnChooseVideo.setOnClickListener(view1 -> {
callChooseFromVideo();
});
}
error message
error: cannot find symbol
Python py = new Python.getInstance();
symbol: class getInstance
location: class Python
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:compileDebugJavaWithJavac
Caused by: org.gradle.api.internal.tasks.compile.CompilationFailedException: Compilation failed; see the compiler error output for details
Could it be a problem with gradle versions? because my gradle version 7.0.4 is showing 7.0 as the latest in chaquopy's docs. can it cause this problem and I am using 10.0.1 as the chaquopy version because android studio recommended it as the latest version. If these are a problem, which versions should I use?
The correct syntax is just Python.getInstance(), not new Python.getInstance().
Hello i am trying export old project in my. android studio version Android Studio 4.2.1
Build #AI-202.7660.26.42.7351085, built on May 10, 2021
when i try compiling my code i am getting this error any one know how fixed this issue
Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not create task ':app:minifyReleaseWithR8'.
Cannot query the value of this provider because it has no value available
i already tried this solution but not working Could not create task ':app:minifyReleaseWithR8'. Cannot query the value of this provider because it has no value available
here is my build.gradle file
buildscript {
repositories {
google()
maven { url 'https://plugins.gradle.org/m2/' }
}
}
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin'
id 'com.android.application'
id 'com.google.gms.google-services'
}
repositories {
maven {
url "https://maven.google.com"
}
}
android {
compileSdkVersion 30
buildToolsVersion '31.0.0-rc3'
defaultConfig {
applicationId "com.example.status"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
// Enabling multidex support.
multiDexEnabled true
}
task wrapper(type: Wrapper) {
gradleVersion = '6.7.1'
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
lintOptions {
checkReleaseBuilds false
// Or, if you prefer, you can continue to check for errors in release builds,
// but continue the build even when errors are found:
abortOnError false
}
buildTypes.each {
it.buildConfigField 'String', 'My_api', app_url
}
lintOptions {
disable 'MissingTranslation'
}
compileOptions {
sourceCompatibility = '1.8'
targetCompatibility = '1.8'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.4.0-alpha03'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.4.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.squareup.retrofit2:retrofit:2.7.2'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'androidx.recyclerview:recyclerview:1.2.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.11.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.google.android.exoplayer:exoplayer:2.15.0'
implementation 'io.github.inflationx:calligraphy3:3.1.1'
implementation 'io.github.inflationx:viewpump:2.0.3'
implementation 'com.google.android.gms:play-services-ads:20.2.0'
implementation 'com.google.android.gms:play-services-auth:19.2.0'
implementation 'com.google.android.ads.consent:consent-library:1.0.8'
implementation 'com.onesignal:OneSignal:4.4.0#aar'
implementation 'com.google.firebase:firebase-analytics:19.0.0'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'io.github.lizhangqu:coreprogress:1.0.2'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'com.chaos.view:pinview:1.4.2'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.github.MasayukiSuda:Mp4Composer-android:v0.4.1'
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'com.facebook.android:facebook-login:5.15.3'
implementation 'com.facebook.android:audience-network-sdk:6.5.1'
implementation 'com.google.ads.mediation:facebook:6.5.1.1'
implementation 'com.github.duanhong169:colorpicker:1.1.6'
implementation "com.hootsuite.android:nachos:1.2.0"
implementation 'com.romandanylyk:pageindicatorview:1.0.3'
implementation 'com.google.android.flexbox:flexbox:3.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'org.jetbrains:annotations:16.0.1'
implementation project(path: ':Wheel')
implementation project(path: ':SmoothCheckBox-master')
implementation project(path: ':IRBottomNavigationLib')
}
java.lang.ClassNotFoundException: Didn't find class "androidx.core.app.CoreComponentFactory" on path: DexPathList[...]
Suppressed: java.io.IOException: Failed to open dex files from /....==/base.apk because: Bad encoded_array value: Failure to verify dex file '.....==/base.apk': Suppressed: java.io.IOException: Failed to open dex files from /data/app/com.abstractnewsdigest-gHpWdk3tBZsBeX9bz-UJ-w==/base.apk because: Bad encoded_array value: Failure to verify dex file '/data/app/com.abstractnewsdigest-gHpWdk3tBZsBeX9bz-UJ-w==/base.apk': Bad encoded_value method type size 7
Project build.gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.3.50'
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "io.realm:realm-gradle-plugin:5.13.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:4.1.0'
}
}
allprojects {
repositories {
jcenter()
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App build.gradle:
apply plugin: "com.android.application"
apply plugin: "kotlin-android"
apply plugin: "kotlin-android-extensions"
apply plugin: "kotlin-kapt"
apply plugin: "realm-android"
android {
compileSdkVersion 29
buildToolsVersion '28.0.3'
defaultConfig {
applicationId 'com.abstractnewsdigest'
minSdkVersion 16
targetSdkVersion 29
versionCode 13
versionName "13"
multiDexEnabled true
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
debug {
//Properties stored in ~/.gradle/gradle.properties
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
}
dataBinding.enabled = true
packagingOptions {
exclude 'META-INF/proguard/androidx-annotations.pro'
}
productFlavors {
}
}
repositories {
google()
maven { url "https://maven.google.com" }
maven { url "https://jitpack.io" }
}
dependencies {
// Place to find the latest available version of support libraries hosted by Google
// https://dl.google.com/dl/android/maven2/index.html
def androidSupportVersion = "28.0.0"
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-firestore:17.1.1'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.firebaseui:firebase-ui-database:4.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.google.android:flexbox:1.0.0'
implementation 'com.squareup.okhttp3:okhttp:3.10.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'androidx.browser:browser:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
// kapt "com.android.databinding:compiler:3.1.3"
implementation 'com.github.pardom:redux-kotlin:1.2.1'
// Litho
def lithoVersion = "0.18.0"
implementation "com.facebook.litho:litho-core:$lithoVersion"
implementation "com.facebook.litho:litho-widget:$lithoVersion"
compileOnly "com.facebook.litho:litho-annotations:$lithoVersion"
kapt "com.facebook.litho:litho-annotations:$lithoVersion"
kapt "com.facebook.litho:litho-processor:$lithoVersion"
// SoLoader
implementation 'com.facebook.soloader:soloader:0.5.1'
// For integration with Fresco
implementation 'com.facebook.fresco:fresco:1.10.0'
implementation "com.facebook.litho:litho-fresco:$lithoVersion"
// For testing
testImplementation "com.facebook.litho:litho-testing:$lithoVersion"
// Sections
implementation "com.facebook.litho:litho-sections-core:$lithoVersion"
implementation "com.facebook.litho:litho-sections-widget:$lithoVersion"
compileOnly "com.facebook.litho:litho-sections-annotations:$lithoVersion"
kapt "com.facebook.litho:litho-sections-annotations:$lithoVersion"
kapt "com.facebook.litho:litho-sections-processor:$lithoVersion"
def lifecycle_version = "1.1.1"
// ViewModel and LiveData
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
kapt 'androidx.lifecycle:lifecycle-compiler:2.0.0'
implementation 'com.android.billingclient:billing:1.1'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
def work_version = "1.0.0-alpha10"
implementation ('androidx.work:work-runtime-ktx:2.0.1') {
exclude group: 'com.google.guava', module: 'listenablefuture'
exclude group: 'androidx.work'
}
// use -ktx for Kotlin
implementation ("android.arch.work:work-firebase:$work_version") {
exclude group: 'com.google.guava', module: 'listenablefuture'
}
implementation 'io.branch.sdk.android:library:2.+'
implementation 'joda-time:joda-time:2.10'
// implementation 'com.facebook.android:facebook-android-sdk:4.37.0'
implementation 'com.google.gms:google-services:4.3.3'
}
apply plugin: 'com.google.gms.google-services'
It will be late but maybe someone needs to know it.
You should add compileOptions { targetCompatibility JavaVersion.VERSION_1_8 }
in your build:gradle(:app) under the android section.Then scyn it. It works for me !
when i add some dependency in my gradle and synced it set Error:Failed to resolve: recyclerview-v7.
i don't know what can i do.i research many time, but not solve.
i remove dependency but again error.
below my dependency:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "avida.ican"
minSdkVersion 16
targetSdkVersion 26
multiDexEnabled true
versionCode 2
versionName "0.0.2"
/*vectorDrawables.useSupportLibrary = true*/
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:support-vector-drawable:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation files('libs/ksoap2-android-assembly-3.6.2-jar-with-dependencies.jar')
compile('com.stanfy:gson-xml-java:0.1.+') {
exclude group: 'xmlpull', module: 'xmlpull' //xml to object
}
implementation 'com.android.support:cardview-v7:26.1.0'
//________________________________________________
//binding
compile "com.jakewharton:butterknife:8.8.1"
annotationProcessor "com.jakewharton:butterknife-compiler:8.8.1"
//________________________________________________
/*implementation 'com.afollestad.material-dialogs:core:0.9.6.0'*/
implementation 'com.orhanobut:dialogplus:1.11#aar'
//loading
implementation 'com.wang.avi:library:2.1.3'
//change font
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
// reactive network checked
implementation 'com.github.pwittchen:reactivenetwork-rx2:0.12.3'
//contain FileUtils and another utils
implementation 'commons-io:commons-io:2.5'
//contain FileUtils and another utils
implementation 'commons-codec:commons-codec:1.11'
//otto bus
implementation 'com.squareup:otto:1.3.8'
implementation 'de.hdodenhof:circleimageview:2.2.0'
//FloatingActionButton
implementation 'com.github.clans:fab:1.6.4'
//editore for text
implementation 'jp.wasabeef:richeditor-android:1.2.2'
//ormlite use in project sqlite database
implementation 'com.j256.ormlite:ormlite-android:5.1'
//file picker
implementation 'com.github.angads25:filepicker:1.1.1'
// recorder
implementation 'com.github.adrielcafe:AndroidAudioRecorder:0.3.0'
// image downloader
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
//multy image,video Picker with list croper
implementation 'com.crop.multiple:multipleImagePickerLib:1.4.4'
implementation 'com.booking:rtlviewpager:1.0.1'
//--------------------------Tab----Layout--------------------
implementation 'com.ogaclejapan.smarttablayout:library:1.6.1#aar'
//Optional
implementation 'com.ogaclejapan.smarttablayout:utils-v13:1.6.1#aar'
//------------------------------------------------------------------
//expandable TextView
compile 'com.ms-square:expandableTextView:0.1.4'
}
}
below my project gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I got tired please help me.
now my gradle dosnt sync.
i want add this dependency:
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
wooooooooow I finally resolved my problem.
i don't Know.but the problem was from maven google().
i removed google() and add
maven {
url 'https://maven.google.com'
}
Instead of.
i solve my problem from this Link
this is my project gradle:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
maven {
url 'https://oss.sonatype.org/content/repositories/ksoap2-android-releases/'
}
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
//google()
maven {
url 'https://maven.google.com'
}
jcenter()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
U need this maven code in your project level gradle file :
repositories{
maven {
url 'http://dl.bintray.com/amulyakhare/maven'
}
}
This question already has answers here:
Duplicate zip entry [classes.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]
(4 answers)
Closed 4 years ago.
When I'm creating an APK I get such an error:
Caused by: java.lang.RuntimeException: java.io.IOException: Can't write [C:\Users\Smokie\Desktop\datemeet\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [C:\Users\Smokie\Desktop\datemeet\app\build\intermediates\transforms\desugar\debug\241.jar(;;;;;;**.class)] (Duplicate zip entry [241.jar:android/support/design/widget/CoordinatorLayout$Behavior.class]))
at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
my build.gradle file :
apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'
buildscript {
repositories {
maven { url "https://github.com/omadahealth/omada-nexus/raw/master/release" }
maven { url "https://jitpack.io" }
}
dependencies {
}
}
android {
signingConfigs {
config {
}
}
lintOptions {
abortOnError false
}
dataBinding {
enabled = true
}
compileSdkVersion 27
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "com.oxyn.datemeet"
minSdkVersion 17
targetSdkVersion 27
versionCode 5
versionName "1.0"
testInstrumentationRunner"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
ext.enableCrashlytics = true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.config
}
debug {
ext.enableCrashlytics = true
proguardFiles 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/services/javax.annotation.processing.Processor'
exclude 'META-INF/**'
exclude 'META-INF/**'
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
repositories {
mavenCentral()
jcenter()
}
android {
dexOptions {
jumboMode = true
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// Navigation Drawer Library
compile('com.mikepenz:materialdrawer:5.3.0#aar') {
transitive = true
}
//Google, Inc (Play services) Libraries
implementation 'com.google.android.gms:play-services-places:11.8.0'
implementation 'com.google.android.gms:play-services-maps:11.8.0'
implementation 'com.google.android.gms:play-services-location:11.8.0'
implementation 'com.google.android.gms:play-services-ads:11.8.0'
implementation 'com.google.android.gms:play-services-auth:11.8.0'
implementation 'com.google.firebase:firebase-core:11.8.0'
implementation 'com.google.firebase:firebase-database:11.8.0'
implementation 'com.google.firebase:firebase-crash:11.8.0'
implementation 'com.google.firebase:firebase-auth:11.8.0'
implementation 'com.google.firebase:firebase-messaging:11.8.0'
implementation 'com.google.firebase:firebase-storage:11.8.0'
implementation 'com.google.firebase:firebase-config:11.8.0'
implementation 'com.google.firebase:firebase-appindexing:11.8.0'
implementation 'com.google.android.gms:play-services-appinvite:11.8.0'
//Google, Inc (Firebase) Libraries
implementation 'com.firebase:firebase-jobdispatcher:0.6.0'
implementation 'com.firebaseui:firebase-ui-database:2.3.0'
implementation 'com.firebase:geofire-android:2.1.2'
// Google, Inc (Support) Libraries
implementation 'com.android.support:support-v13:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support:multidex:1.0.2'
implementation 'com.android.support:palette-v7:27.0.2'
implementation 'com.android.support:support-vector-drawable:27.0.2'
// Facebook, Inc SDKs
implementation 'com.facebook.android:facebook-android-sdk:4.29.0'
// Libraries for images
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.lorentzos.swipecards:library:1.0.9'
implementation 'com.skyfishjy.ripplebackground:library:1.0.1'
implementation 'com.vanniktech:emoji-twitter:0.5.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
implementation 'com.github.yalantis:ucrop:2.2.1'
implementation 'com.github.jkwiecien:EasyImage:1.3.1'
implementation 'jp.wasabeef:picasso-transformations:2.1.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
// Location Helper Library
implementation 'com.squareup.retrofit2:retrofit:2.2.0'
implementation 'com.squareup.retrofit:converter-gson:2.0.0-beta1'
// Time library
implementation 'joda-time:joda-time:2.9.9'
implementation 'org.ocpsoft.prettytime:prettytime:4.0.1.Final'
implementation 'org.greenrobot:eventbus:3.0.0'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.flipboard:bottomsheet-core:1.5.3'
implementation 'com.flipboard:bottomsheet-commons:1.5.3'
implementation 'com.greysonparrelli.permiso:permiso:0.3.0'
implementation 'com.googlecode.libphonenumber:libphonenumber:8.5.2'
implementation 'com.airbnb.android:lottie:2.2.5'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
}
apply plugin: 'com.google.gms.google-services'
I'm using Android Studio 3.1
when I updated the libraries: import static com.google.android.gms.internal.zzahn.runOnUiThread; the code is failing.
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:palette-v7:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'
error: cannot find symbol static runOnUiThread
I Changed Android Studio Version 2.3.3. Now Perfectly works.
You might have the jar in your libs folder. Please check, if it is there, then remove it ,and clean and build it again.
I have same Error in recent Days i solved to changing the support library version
implementation 'com.android.support:support-v13:27.1.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:support-v4:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support:palette-v7:27.1.0'
implementation 'com.android.support:support-vector-drawable:27.1.0'