Manifest Merger Error when adding Vokaturi - android

I'm making a Mobile and Wear application. However, for the wear build.gradle I'm getting this error:
Error:Execution failed for task ':wear:processDebugManifest'.
Manifest merger failed : Attribute application#theme value=(#android:style/Theme.DeviceDefault) from AndroidManifest.xml:15:9-59
is also present at [:OpenVokaturi-3-0-android:] AndroidManifest.xml:17:9-40 value=(#style/AppTheme).
Suggestion: add 'tools:replace="android:theme"' to element at AndroidManifest.xml:10:5-36:19 to override.
"
This is the Mobile.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "chun.emotionsensor"
minSdkVersion 25
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
wearApp project(':wear')
implementation 'com.google.android.gms:play-services-wearable:+'
compile(name: 'OpenVokaturi-3-0-android', ext: 'aar')
implementation 'com.android.support:support-annotations:27.1.1'
}
This is the wear.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "chun.emotionsensor"
minSdkVersion 25
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.google.android.support:wearable:2.3.0'
implementation 'com.google.android.gms:play-services-wearable:15.0.1'
implementation 'com.android.support:percent:26.1.0'
implementation 'com.android.support:support-v4:26.1.0'
implementation 'com.android.support:recyclerview-v7:26.1.0'
implementation 'com.android.support:wear:26.1.0'
compileOnly 'com.google.android.wearable:wearable:2.3.0'
compile(name: 'OpenVokaturi-3-0-android', ext: 'aar')
}

The OpenVokaturi library that you have included in your build has set a theme value that conflicts with the theme of your application.
It is possible to overrride this conflicting theme by adding the following to your manifest, AndroidManifest.xml, and building your application again:
tools:replace="android:theme"

Related

How to change the "min Sdk version"?

I'm changing the minSdk version but when I build/generate apk(s) I get this error:
failed linking references.
I have tried Invalidating Caches and restarting
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.clubs"
minSdkVersion 21
targetSdkVersion 27
vectorDrawables.useSupportLibrary = true
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'androidx.appcompat:appcompat:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.1.0-alpha04'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:16.1.0'
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'nl.psdcompany:duo-navigation-drawer:3.0.0'
implementation 'com.github.ApendIr:slider:1.0'
implementation 'com.azoft.carousellayoutmanager:carousel:1.2.4'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.2-alpha01'
implementation 'com.jakewharton:butterknife:10.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.2-alpha01'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
}
I don't know if this is what is resulting to the apps crashing in some phones
Set the min SDK version within your project's AndroidManifest.xml file:
<uses-sdk android:minSdkVersion="21"/>

Android project cannot build with gradle after importing a module

I created an android app and I wanted to include the vokaturi module. I changed the vokaturi.gradle file with "com.android.library" and I included ":vokaturi" module in the settings.gradle file and in the main app module I added implementation project(':vokaturi') When I try to syncronised main app module I get the error
Could not find :OpenVokaturi-Android:.
Required by:
project :app > project :vokaturi
Search in build.gradle files
This is how my main app.gradle file looks like.
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.afinity"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation project(':vokaturi')
}
And this is how the vokaturi.gradle file looks like
apply plugin: 'com.android.library'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
flatDir {
dirs 'libs/aars'
}
}
dependencies {
implementation(name: 'OpenVokaturi-Android', ext: 'aar')
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
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'
}
I do not know what I do wrong...I am new at android, thank you all for any help
The default name of the file is probably - OpenVokaturi-3-0-android.aar and not OpenVokaturi-Android which is why you're getting that error. Also this -
implementation(name: 'OpenVokaturi-3-0-android.aar', ext: 'aar')
should not be in your vokaturi module but rather in your app.gradle file. Add that line to your app gradle file and then include vokaturi directly as an aar file.

The apk file of my project cannot be installed and I get the Instant Ran massage

When I run it in my phone or an emulator, it cannot be installed and the icon is not shown.
I get the "Instant Run performed a full build and install since the installation on the device does not match local build on disk." message.
Here is my app build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "com.example.ava.book3"
minSdkVersion 23
targetSdkVersion 27
versionCode 1
versionName "1.7"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
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:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.github.barteksc:android-pdf-viewer:2.0.3'
compile 'com.android.support:appcompat-v7:+'
compile files('libs/jtds-1.3.1.jar')
compile 'com.zarinpal:purchase:0.0.3-beta'
implementation 'com.android.support:design:27.1.1'
implementation 'com.google.android.gms:play-services-auth:12.0.1'
implementation 'com.daimajia.easing:library:2.0#aar'
implementation 'com.daimajia.androidanimations:library:2.3#aar'
implementation
'com.github.devlight.navigationtabstrip:navigationtabstrip:1.0.4'
}
apply plugin: 'com.google.gms.google-services'

implementation error - picasso:2.71828 (More than one file was found with OS independent path)

An error occurred when I wrote this syntax to add the picasso library.
(More than one file was found with OS independent path 'okhttp3/internal/publicsuffix/publicsuffixes.gz')
My android gradle is as follows!!
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.example.i203_153.smarthome"
minSdkVersion 24
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'
}
}
productFlavors {
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.squareup.picasso:picasso:2.71828'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation files('libs/jackson-annotations-2.1.2.jar')
implementation files('libs/com.fasterxml.jackson.core.jar')
implementation files('libs/com.fasterxml.jackson.databind.jar')
}
How do I fix the following errors? Please help me!!
Try this
compile 'com.squareup.picasso:picasso:2.5.0'

Can't start a new project because of gradle error

I created a new project as usual andafter the gradle running I get this error:
`Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.`
This is my fresh project gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.elili.deltacalculator"
minSdkVersion 18
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
I have zero ideas on how to fix it...
If you are not going to implement testing code, then remove junit from your app. You can replace your gradle by below.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.elili.deltacalculator"
minSdkVersion 18
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
You need to try the annotation library using:
androidTestCompile 'com.android.support:support-annotations:26.1.0'
First way, It use like this:
Force to use support annotations in the test app, so it is internally used by the runner module.
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:appcompat-v7:26.1.0'
.
.
.
.
androidTestCompile 'com.android.support:support-annotations:26.1.0'
}
Second way is to use this as:
configurations.all {
resolutionStrategy.force 'com.android.support:support-annotations:26.1.0'
}

Categories

Resources