I have written code in CPP and linked with gradle using cmake now there another sub module like bottomsheet and few more and now while sync gradle I get the following error:
Unable to resolve dependency for ':app#externalNativeBuild/compileClasspath': Could not resolve project :bottomsheet
build.gradle(Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.devmedia.videostatus"
minSdkVersion 14
targetSdkVersion 27
versionCode 4
versionName "1.3"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
debuggable false
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
minifyEnabled false
shrinkResources false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
externalNativeBuild {
cmake {
// Provides a relative path to your CMake build script
path "CMakeLists.txt"
}
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.firebase:firebase-messaging:17.0.0'
implementation 'com.google.firebase:firebase-config:16.0.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.google.code.gson:gson:2.8.2'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.1', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation project(path: ':bottomsheet')
}
apply plugin: 'com.google.gms.google-services'
How can resolve above error ?
Related
Is there any changes that i want to do in gradle file to work the release app properly. I have recently shifted from normal app to androidx. When i have debug the app and run in my phone it's working properly but when i have installed the release app the it's not working so how to fix it ? When i have move my app to android-x then it has requesting me to change the setShiftingMode(false) to setShifting(false) the problem has been occured due to this or not. How i can fix the above issue ?
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.8, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
defaultConfig {
applicationId "com.example.demo"
manifestPlaceholders = [onesignal_app_id : "fa5f9ac7-sdfdf-dfdf-exampleid-6f",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
minSdkVersion 19
targetSdkVersion 29
versionCode 5
versionName "5.1.11"
testInstrumentationRunner 'androidx.test.runner.AndroidJUnitRunner'
multiDexEnabled true
}
android {
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
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
buildTypes {
release {
debuggable false
shrinkResources true
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.squareup.retrofit2:retrofit:2.4.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.10.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.jakewharton:butterknife:10.0.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.0.0'
implementation 'com.github.clans:fab:1.6.4'
implementation 'com.devbrackets.android:exomedia:4.2.1'
implementation 'com.daimajia.numberprogressbar:library:1.4#aar'
debugImplementation 'com.amitshekhar.android:debug-db:1.0.3'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation project(':library')
implementation('com.github.afollestad.material-dialogs:core:0.8.5.1#aar') {
transitive = true
}
implementation 'org.jsoup:jsoup:1.11.1'
implementation 'com.github.faruktoptas:FancyShowCaseView:1.0.1'
implementation 'com.onesignal:OneSignal:[3.15.0, 3.99.99]'
implementation 'com.google.android.gms:play-services-ads:19.3.0'
implementation 'com.google.firebase:firebase-core:17.4.4'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'io.branch.sdk.android:library:2.+'
implementation project(':jiaozivideoplayer')
}
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
when I am generating signed APK in android this error is coming again and again,and jetified-jav-json file is opening.this is may be due to my gradle file --This is error generated by android studio --
Type org.json.CDL is defined multiple times: C:\Users\91971.gradle\caches\transforms-2\files-2.1\4ff16b76dc52b01ac4898d797a9f3375\jetified-java-json.jar:org/json/CDL.class, C:\Users\91971\AndroidStudioProjects\APS-Money-updated\aeps_lib-1July\build.transforms\832bfa6b3f0d8c75ed631f792cb4e02d\jetified-aeps_lib-1July-runtime.jar:org/json/CDL.class
this is my build.gradle--
apply plugin: 'com.android.application'
android {
packagingOptions {
exclude 'AndroidManifest.xml'
}
compileSdkVersion 28
buildToolsVersion "28.0.3"
defaultConfig {
applicationId "com.aps.apsmoney"
minSdkVersion 21
targetSdkVersion 28
multiDexEnabled true
versionName "1.0"
versionCode 1
//versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
android {
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
aaptOptions { cruncherEnabled = false }
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
zipAlignEnabled true
debuggable = false
jniDebuggable = false
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.android.support:design:28.0.0'
implementation files('libs/org.apache.http.legacy.jar')
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation files('libs/signpost-core-1.2.1.2.jar')
implementation('de.keyboardsurfer.android.widget:crouton:1.8.5#aar') {
exclude group: 'com.google.android', module: 'support-v4'
}
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation files('libs/java-json.jar')
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation project(':aeps_lib-1July')
implementation 'com.google.code.gson:gson:2.8.6'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.journeyapps:zxing-android-embedded:3.3.0'
implementation 'com.github.bumptech.glide:glide:4.8.0'
implementation 'androidx.multidex:multidex:2.0.1'
}
This is due to some unused dependency i had added...remove unsused dependency and problem get resolved....kindly remove dependency one by one check which dependency is effecting project....It tooked about 1 week for me to find thid bug...
build.gradle(Module:app)
apply plugin: 'com.android.application'
apply plugin: 'com.apollographql.android'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.startup.grandinvit"
minSdkVersion 15
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
//useProguard true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
debuggable true
//useProguard true
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-firestore:17.1.2'
androidTestImplementation 'com.google.code.findbugs:jsr305:3.0.1'
androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0', {
exclude group: 'com.android.support', module: 'support-annotations'
})
//noinspection GradleCompatible
implementation 'androidx.appcompat:appcompat:1.0.0'
testImplementation 'junit:junit:4.12'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-vision:17.0.2'
implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
implementation 'com.airbnb.android:lottie:2.0.0-rc1'
// Check for v11.4.2 or higher
implementation 'com.google.firebase:firebase-core:16.0.6'
// Add dependency
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.7'
//implementation 'org.jetbrains:annotations-java5:15.0'
//implementation 'org.jetbrains:annotations:16.0.2'
implementation 'com.apollographql.apollo:apollo-runtime:1.0.0'
implementation "com.apollographql.apollo:apollo-android-support:1.0.0"
implementation "androidx.annotation:annotation:1.1.0"
androidTestImplementation "com.android.support:support-annotations:28.0.0"
}
When I build the project, I am getting an error "error: package android.support.annotation does not exist"
I tried below ways to solve it.
In *.java file, I tried commenting and adding imports again.
I tried adding adding "androidx.annotation:annotation:1.1.0"
but still no luck.
gradle.properties
org.gradle.jvmargs=-Xmx1536m
android.enableR8=true
android.useAndroidX=true
android.enableJetifier=true
Thanks for your help in advance, I am stuck with this for quite some time, any help will be highly appreciated.
Try to change from:
androidTestImplementation "com.android.support:support-annotations:28.0.0"
to
implementation "com.android.support:support-annotations:28.0.0"
I'm getting this error when I try to add Work Manager library to the project gradle file:
Failed to resolve: android.arch.work:work-runtime:1.0.0-aplha02
I'm also using fabric, it's dependencies are included in the project level build.gradle. I don't think the maven repositry lines are messing up the project.
And I wanted to also ask if it's safe to use an alpha level library in
production level app?
build.gradle(Module: app):
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
android {
signingConfigs {
config {
keyAlias 'androiddebugkey'
keyPassword 'androooid'
storePassword 'androooid'
}
release {
keyAlias 'pixieee'
keyPassword 'Hello1234'
}
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "com.pixie.pixieentertainmentsystem"
minSdkVersion 22
targetSdkVersion 27
versionCode 11
versionName "1.031"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
//signingConfig signingConfigs.config
}
}
productFlavors {
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'com.google.firebase:firebase-storage:11.6.2'
implementation 'com.google.firebase:firebase-core:11.6.2'
implementation 'com.google.firebase:firebase-database:11.6.2'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:support-v4:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-auth:11.6.2'
implementation 'com.google.android.gms:play-services-auth:11.6.2'
implementation 'com.squareup.picasso:picasso:2.5.2'
//apply plugin: 'com.google.gms.google-services'
implementation 'com.android.support:recyclerview-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.volley:volley:1.1.0'
implementation 'com.google.android.gms:play-services-location:11.6.2'
implementation 'com.google.android.gms:play-services-analytics:11.6.2'
implementation 'com.google.android.exoplayer:exoplayer:2.6.1'
implementation 'uk.co.chrisjenx:calligraphy:2.2.0'
implementation 'com.danikula:videocache:2.7.0'
implementation 'jp.wasabeef:blurry:2.1.1'
implementation 'org.androidannotations:androidannotations-api:3.3.2'
//apt 'org.androidannotations:androidannotations:3.3.2'
implementation 'com.danikula:videocache:2.7.0'
implementation 'com.github.bumptech.glide:glide:3.8.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'android.arch.work:work-runtime:1.0.0-aplha02'
debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.5.4'
releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.5.4'
implementation('com.crashlytics.sdk.android:crashlytics:2.7.1#aar') {
transitive = true
}
apply plugin: 'com.google.gms.google-services'
I even tried clean and rebuild my project it builds successfully but when i try to run my app it always throws this error message and I also manually tried to delete my /.gradle folder and re-opened android studio and run my app, then also again it's the same error.In this project I'm just trying to connect my app with AWS Dynamodb.
this is my error :
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> More than one file was found with OS independent path 'com/amazonaws/services/sqs/request.handlers'
this was my gradle :
/* Copyright © 2018 Quillbook. All rights reserved */
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.dumpcoders.danielcruise.quillbook"
minSdkVersion 17
multiDexEnabled true
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'AndroidManifest.xml'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile('com.amazonaws:aws-android-sdk-mobile-client:2.6.7#aar') { transitive = true }
compile 'com.amazonaws:aws-android-sdk-cognito:2.6.16'
compile 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.6.16'
compile 'com.amazonaws:aws-android-sdk-core:2.6.16'
compile 'com.amazonaws:aws-android-sdk-ddb:2.6.16'
compile 'com.amazonaws:aws-android-sdk-mobileanalytics:2.6.16'
compile 'com.amazonaws:aws-android-sdk-s3:2.6.16'
compile 'com.amazonaws:aws-android-sdk-sns:2.6.16'
compile 'com.amazonaws:aws-android-sdk-sqs:2.6.16'
implementation files('libs/aws-android-sdk-apigateway-core-2.6.15.jar')
}
this is my current gradle :
/*
* Copyright © 2018 Quillbook. All rights reserved
*/
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.dumpcoders.danielcruise.quillbook"
minSdkVersion 17
multiDexEnabled true
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'AndroidManifest.xml'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
}
dexOptions {
jumboMode true
javaMaxHeapSize "4g"
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:27.0.2'
implementation 'com.android.support:support-v4:27.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
implementation ('com.amazonaws:aws-android-sdk-mobile-client:2.6.15#aar') { transitive = true }
implementation 'com.amazonaws:aws-android-sdk-cognito:2.6.15'
implementation 'com.amazonaws:aws-android-sdk-cognitoidentityprovider:2.6.15'
implementation 'com.amazonaws:aws-android-sdk-core:2.6.15'
implementation 'com.amazonaws:aws-android-sdk-ddb:2.6.15'
implementation 'com.amazonaws:aws-android-sdk-mobileanalytics:2.6.15'
implementation 'com.amazonaws:aws-android-sdk-s3:2.6.15'
implementation 'com.amazonaws:aws-android-sdk-sns:2.6.15'
implementation 'com.amazonaws:aws-android-sdk-sqs:2.6.15'
api group: 'com.amazonaws', name: 'aws-android-sdk-apigateway-core', version: '2.6.15'
}
This is the screenshot of my "app/libs" folder
Replace
implementation files('libs/aws-android-sdk-apigateway-core-2.6.15.jar')
with
compile group: 'com.amazonaws', name: 'aws-android-sdk-apigateway-core', version: '2.6.15'
if not work,try below command for identify the issue
gradlew -q dependencies yourProject:dependencies --configuration compile