build.gradle

Can not run application below lollipop

本秂侑毒 提交于 2019-12-29 07:43:20
问题 I am working with android studio .My application working fine in lollipop devices but when i run application in below lollipop devices it gives me given below error message. I have also tried with this answer In case of problem, please repackage it with jarjar to change the class packages Warning:Dependency xpp3:xpp3:1.1.4c is ignored for release as it may be conflicting with the internal version provided by Android. In case of problem, please repackage it with jarjar to change the class

How to specify source and target compatibility in Java module?

徘徊边缘 提交于 2019-12-29 07:36:09
问题 I have a Gradle project consisting of an Android module (the com.android.library plugin is applied in the build.gradle file) and a Java module (the java plugin is applied in the build.gradle file). Within the build.gradle file of the Java module I was previously specifying the source and target compatibility as follows: apply plugin: 'java' compileJava { sourceCompatibility = 1.7 targetCompatibility = 1.7 } I've just updated the project's "Android Plugin for Gradle" and "Gradle Wrapper"

Error :- Execution failed for task ':app:dexDebug' in android studio

别说谁变了你拦得住时间么 提交于 2019-12-29 07:31:59
问题 I newly Android project started a new default project. Everytime I try to start the app this error occurs: build.gradle(Module:app) apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.jdevani.validationdemo" minSdkVersion 8 targetSdkVersion 21 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } }

Gradle exclude plugin in main project for specific subproject(s)

被刻印的时光 ゝ 提交于 2019-12-29 06:38:26
问题 I am working on a larger project that contains many subprojects which are all build with gradle. Generally all projects are java projects, therefore in the main build.gradle script allprojects { apply plugin: 'java' } is specified for all projects. However I need to either remove the plugin for a certain subtree of projects or explicitly exclude the the projects from the plugin. Heres a rough overview of the project layout + Main +-- javaApplications +-- javaLibs +-- Android +-----AndroidApps

Gradle exclude plugin in main project for specific subproject(s)

你。 提交于 2019-12-29 06:38:07
问题 I am working on a larger project that contains many subprojects which are all build with gradle. Generally all projects are java projects, therefore in the main build.gradle script allprojects { apply plugin: 'java' } is specified for all projects. However I need to either remove the plugin for a certain subtree of projects or explicitly exclude the the projects from the plugin. Heres a rough overview of the project layout + Main +-- javaApplications +-- javaLibs +-- Android +-----AndroidApps

Cannot resolve symbol Theme, ThemeOverlay

末鹿安然 提交于 2019-12-29 06:37:27
问题 I updated my android studio to latest version - 3.0.1. Since then it complains 'Cannot resolve symbol' for Theme and ThemeOverlay in the following lines of code. App runs fine but they are marked in RED in the file. styles.xml <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar"></style> <style name="AppTheme.AppBarOverlay" parent="ThemeOverlay.AppCompat.Dark.ActionBar" /> <style name="AppTheme.PopupOverlay" parent="ThemeOverlay.AppCompat.Light" /> build.gradle is updated with

java.util.scanner throws NoSuchElementException when application is started with gradle run

拜拜、爱过 提交于 2019-12-29 06:14:24
问题 I have a created a simple java "echo" application that takes a user's input and shows it back to them to demonstrate the issue. I can run this application without trouble using IntelliJ's internal "run" command, and also when executing the compiled java file produced by gradle build . However, if I try to execute the application using gradle run , I get a NoSuchElementException thrown from the scanner. I think gradle or the application plugin specifically is doing something strange with the

How do I add resources to sourceSet with gradle?

懵懂的女人 提交于 2019-12-29 04:09:05
问题 Currently I have the following build.gradle file: apply plugin: 'java' repositories { mavenCentral() } sourceSets { main { java { srcDir 'src/model' } resources { srcDir 'images/model' } } test { java { srcDir 'tests/model' } resources { srcDir 'images/model' // <=== NOT WORKING } } } dependencies { compile files('libs/mnist-tools.jar', 'libs/gson-2.2.4.jar') runtime fileTree(dir: 'libs', include: '*.jar') testCompile group: 'junit', name: 'junit', version: '4.+' } My repository if here:

On gradle:3.0.0 More than one file was found with OS independent path 'META-INF/ASL2.0'

一世执手 提交于 2019-12-28 13:22:11
问题 I have updated my Android studio to 3.0 and then he asked to upgrade to 'com.android.tools.build:gradle:3.0.0' everything went well until i decided to run my project and it's giving me this Error Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'. More than one file was found with OS independent path 'META-INF/ASL2.0' My app gradle android { compileSdkVersion 26 buildToolsVersion "26.0.2" useLibrary 'org.apache.http.legacy' defaultConfig { applicationId "com

Setting up Gradle for api 26 (Android)

纵然是瞬间 提交于 2019-12-28 04:53:06
问题 Since I have upgraded my Nexus 5x to Android O DP3 I am not able to test my applications. I get the error for not having configured my Gradle-file to work with the new API-level (26). So I changed this and the dependencies, but I keep getting errors on ALL my support libraries like Failed to resolve: com.android.support:design:26.0.0-beta2 Clicking on Install repository and sync project Pops up a progressdialog for downloading the right dependency but does not remove the error. Cleaning up