Error in android studio when trying to build the project - java

I am trying to build an android project from android studio version 3.0.1. When I try to compile my project I stuck into this error
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 11 cannot be smaller than version 14 declared in library [com.parse:parse-android:1.16.7] E:\codecanyon-19950163-whatsapp-status-downloader\WhatsDownloader\WI Video Downloader\app\build\intermediates\exploded-aar\com.parse\parse-android\1.16.7\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.parse" to force usage
Please suggest a solution to solve this solution but i cannot fix this issue
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.kingdov.whatsapp_status_downloader"
minSdkVersion 11
targetSdkVersion 23
versionCode 1
versionName "KINGDOV"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.android.support:recyclerview-v7:23.2.1'
compile 'com.android.support:cardview-v7:23.2.1'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.mani:ThinDownloadManager:1.2.2'
compile 'net.rdrei.android.dirchooser:library:3.2#aar'
}
Now I am getting this from the stack trace
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:processDebugResources'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)

Go to Gradle Scripts > build.gradle(module: app)
search for
defaultConfig {
...........
minSdkVersion 11 //change this to 14
..........
}

It seems that your minimum API cant be lower than 14 because of a library. To fix, go to File, Project Structure,Then under Modules click App, then Flavors and change in the textbox minSdk to something higher than 14. Hope that helps!

Related

Android Studio: java.util.zip.ZipException: duplicate entry

I've been trying to implement the Swipe menu list view library by Baoyongzhang, but keep getting the following error message:
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/baoyz/swipemenulistview/SwipeMenu.class
My initial thought was this would be due to the dependencies so I added
multiDexEnabled true
(Which didn't work, So I've tried a number of additional things such as excluding the support module:
compile ('com.baoyz.swipemenulistview:library:1.3.0') {
exclude module: 'support-v4'
}
Still does not work... Also tried Cleaning, rebuilding etc.. These All succeed, but when I press the run app button, this is where the error appears.
Any help would be appreciated, here is my build.gradle app module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "24.0.3"
defaultConfig {
applicationId "com.android.app"
minSdkVersion 16
targetSdkVersion 23
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:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.squareup.okhttp3:okhttp:3.3.1'
compile 'com.baoyz.swipemenulistview:library:1.3.0'
}
Note: To set this up, I created a new package and copied across the required files, and then followed the step by step guide on the github page to implement this into my application.
Library:
https://github.com/baoyongzhang/SwipeMenuListView

want use com.mcxiaoke.volley in android project

hello i want create a android apk.
and need to use from "com.mcxiaoke.volley" and "com.android.support:appcompat"
please give me a build app for my app.
current build app is :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
//buildToolsVersion "23.0.2"
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "boxweb.asia.shopcenter"
minSdkVersion 14
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies
{
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:design:23.1.1'
compile 'com.android.volley:volley:1.0.0'
}
but don't work and show error.
error is : http://up.vbiran.ir/uploads/45106145544003944084_Untitled-1.jpg
i can not download "https://jcenter.bintray.com/com/android/volley/volley/1.0.0/volley-1.0.0.pom" in android-studio but can download in browser.
help me to install plugin from file.
please help me
Adding volley support can done just by adding compile 'com.mcxiaoke.volley:library:1.0.19 to gradle.build dependencies module.
dependencies
{
compile 'com.mcxiaoke.volley:library:1.0.19'
}
Go through Android Volley Library
Make sure you have jcenter() in your dependencies. So your build.gradle should have:
repositories {
jcenter()
}
dependencies {
compile 'com.android.volley:volley:1.0.0'
}
Note:
The repositories block can either be in your root build.gradle or your app/build.gradle.

Execution failed for process app:dexDebug after adding BaseGameUtils

I just imported baseGameUtils to my android game in order to add a Google play Leaderboard however, when I press play I get this error: `Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-7-openjdk-amd64/bin/java'' finished with non-zero exit value 2`
I tried following the instructions from these two pages: Stackoverflow question 1, Stackoverflow question 2.
I tried setting the google support libraries to 22.2.1 and 8.1.0 in the basegameutils build.gradle, but then I get missing dependencies in the .java files in that library.
I'm all out of ideas and in need of help.
Thank you all in davance.
app:build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.honeycomb.touchtycube"
minSdkVersion 14
targetSdkVersion 22
versionCode 11
versionName "1.1.6"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
//compile project(':facebook');
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.google.android.gms:play-services-ads:8.1.0'
compile 'com.google.android.gms:play-services-games:8.1.0'
compile project(':BaseGameUtils')
//compile project(':libs:basegameutils')
//compile 'com.purplebrain.adbuddiz.sdk:AdBuddiz-Java:3.0.15'
compile files('src/main/java/com/honeycomb/touchtycube/testapp/libs/AdBuddiz-3.0.15.jar')
}
repositories {
maven {
url 'http://repository.adbuddiz.com/maven'
}
}
BaseBuildUtils:build_gradle:
apply plugin: 'com.android.library'
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.3.0'
}
}
dependencies {
// Set defaults so that BaseGameUtils can be used outside of BasicSamples
if (!hasProperty('appcompat_library_version')) {
ext.appcompat_library_version = '20.0.+'
}
if (!hasProperty('support_library_version')) {
ext.support_library_version = '20.0.+'
}
if (!hasProperty('gms_library_version')) {
ext.gms_library_version = '7.8.0'
}
compile "com.android.support:appcompat-v7:${appcompat_library_version}"
compile "com.android.support:support-v4:${support_library_version}"
compile "com.google.android.gms:play-services-games:${gms_library_version}"
compile "com.google.android.gms:play-services-plus:${gms_library_version}"
compile "com.google.android.gms:play-services-appstate:${gms_library_version}"
}
android {
// Set defaults so that BaseGameUtils can be used outside of BasicSamples
if (!hasProperty('android_compile_version')) {
ext.android_compile_version = 20
}
if (!hasProperty('android_version')) {
ext.android_version = '20'
}
compileSdkVersion android_compile_version
buildToolsVersion android_version
}
EDIT:
I can do a "make Project" without any errors, the errors only appear when I do a "run app" (Or well I guess it's technically "run 'configuration'").
Check you prograud rules once. Also add your gradle build file.

Fail to resolve third-party libraries

I download a Android Studio project from https://github.com/chenyangcun/MaterialDesignExample . I add it to my Android Studio and run it,but there occurs some errors:
The blew is the build.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.aswifter.materialexample"
minSdkVersion 15
targetSdkVersion 21
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:design:22.2.1'
compile 'com.android.support:appcompat-v7:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.loopj.android:android-async-http:1.4.7'
compile 'com.google.code.gson:gson:2.3'
compile 'com.afollestad:material-dialogs:0.7.6.0'
}
And then I build a whole new Android project with the same "third-party libraries"
The blew is my bulid.gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.0"
defaultConfig {
applicationId "com.mummyding.app.test"
minSdkVersion 15
targetSdkVersion 23
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.0.0'
compile 'com.android.support:design:22.2.1'
compile 'com.android.support:cardview-v7:22.2.1'
compile 'com.android.support:recyclerview-v7:22.2.1'
compile 'com.github.bumptech.glide:glide:3.6.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.loopj.android:android-async-http:1.4.7'
compile 'com.google.code.gson:gson:2.3'
compile 'com.afollestad:material-dialogs:0.7.6.0'
}
What confuses me is the "error info":
compile 'de.hdodenhof:circleimageview:1.3.0' is okay in this project!!!
so my questions:
Can you run this project in your Andorid Studio?
Why the "error info" different?
How to fix it?
PS:
Gradle Version : 2.2.1
IDE: Android Studio 1.2.1.1
OS: Ubuntu 15.04
I am in China but I have got a router with shadowsocks (which means I can visit any website I want)
It really confuse me for a long time,so any suggestion will be highly appreciated,thank you advance.
The problem may be your proxy settings. You may need to set the following in gradle.properties (please modify according to your proxy settings):
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=8123
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=8123
I fixed it!!!!
It's not caused by GFW .It works well when I replaced OpenJDK with Oracle-JDK on my ubuntu!
Please try this with sudo
dnf install python3-m2crypto
https://fedora.pkgs.org/35/fedora-x86_64/python3-m2crypto-0.38.0-2.fc35.x86_64.rpm.html

Failed to resolve dependency while sync with gradle in Android studio 1.2

I just met this error while trying to sync gradle after add a new line in my app gradle file:
compile 'com.umeng.analytics:analytics:latest.integration'
The error is shown as below:
Error:A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugCompile'.
Could not resolve com.umeng.analytics:analytics:latest.integration.
Required by:
PalmHeart:app:unspecified
Failed to list versions for com.umeng.analytics:analytics.
Unable to load Maven meta-data from https://jcenter.bintray.com/com/umeng/analytics/analytics/maven-metadata.xml.
Could not GET 'https://jcenter.bintray.com/com/umeng/analytics/analytics/maven-metadata.xml'.
Connection to http://127.0.0.1:8087 refused
And I think it might be something wrong with my http proxy, you can check this picture below:
And here is my gradle file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.mzzo.palmheart"
minSdkVersion 15
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:22.1.1'
compile 'com.android.support:support-v4:22.1.1'
compile 'com.android.support:recyclerview-v7:21.0.3'
compile 'com.readystatesoftware.systembartint:systembartint:1.0.4'
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.loopj.android:android-async-http:1.4.6'
compile 'com.google.code.gson:gson:2.3.1'
compile 'com.umeng.analytics:analytics:latest.integration'
compile project(':FloatingActionButton')
compile files('libs/andbase.jar')
compile files('libs/AndroidSwipeLayout-v1.1.8.jar')
compile files('libs/umeng-update-v2.6.0.1.jar')
}
I searched a lot in google but still can't figure out why, hopefully I could find the answer here.
Many thanks.

Categories