build.gradle

Error:The 'java' plugin has been applied, but it is not compatible with the Android plugins

牧云@^-^@ 提交于 2019-12-11 03:43:30
问题 I am working on one library project in android. I want to upload my library to the JCenter. I have created bintray account etc & followed all steps which are mentioned here. I did below changes in my application module & library module. Application Module build.gradle apply plugin: 'com.android.application' android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "com.app.testapp" minSdkVersion 8 targetSdkVersion 22 versionCode 1 versionName "1.0" } buildTypes {

What do I need enable or install to get the annotation @RunWith

我怕爱的太早我们不能终老 提交于 2019-12-11 03:35:02
问题 I want to create a simple test with Robolectric for Android Apps using Android Studio. Ok, it is my build.gradle on root directory: buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.3.0' } } allprojects { repositories { jcenter() } } And it is my app build.gradle file: apply plugin: 'com.android.application' android { compileSdkVersion 23 buildToolsVersion "23.0.1" sourceSets { androidTest.setRoot('src/test') } defaultConfig { applicationId

Room persistence library (dependency issue), MVVM design pattern

a 夏天 提交于 2019-12-11 03:17:23
问题 Iam following MVVM tutorial and when adding Room dependency 1- I got this this error in compile: Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@54d771f9 Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@4c00a268 Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@42104314 Note: Failed to read get kotlin metadata for [Ljava.lang.Object;@203b72ad 2- also this: (SOLVED) error: cannot find symbol class of when adding this code in MainActivity : public

Program type already present: com.google.thirdparty.publicsuffix

可紊 提交于 2019-12-11 02:37:24
问题 When I am try to compile my application ,the error shows Program type already present: com.google.thirdparty.publicsuffix.TrieParser Message{kind=ERROR, text=Program type already present: com.google.thirdparty.publicsuffix.TrieParser, sources=[Unknown source file], tool name=Optional.of(D8)} Is there any issue in my gradle files? My project level bulid.gradle is // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories {

How to set “-aspectpath” for the FreeFair AspectJ Gradle Plugin?

血红的双手。 提交于 2019-12-11 02:08:50
问题 I am trying to use an AspectJ Annotation that is in a Library, that I am pulling into my project. My project uses Gradle, so I am attempting to use FreeFair AspectJ Gradle Plugin. I need to be able to set the AspectJ -aspectpath argument, to the Library Dependency that Gradle is pulling in. FreeFair, does not seem to have much Documentation, mainly just Sample Code. In their sample code, I see that I can use this to set the -aspectpath to a local "project": aspect project(":aspectj:aspect")

Gradle project for plain Java and Android with single source tree

╄→гoц情女王★ 提交于 2019-12-11 02:08:49
问题 I'm running project which includes both plain Java (Swing UI) and Android parts, basically source tree consisting 3 parts: |---swing (30% of code) | src-----|---common (40% of code) | |---android (30% of code) How should I define gradle project(s) in order to build from the same sources 2 different apps - one for Java/Swing another one for Android? I tried different approaches but in the end failed... Update If one'd consider 2 or more projects with independent source trees - no problem to

errors with gradle in android studio

会有一股神秘感。 提交于 2019-12-11 00:52:51
问题 I am trying to build the project and run it in my google glass but when ever i am trying to build it is showing that Error:(20, 0) Gradle DSL method not found: 'runProguard()' Possible causes: The project 'gdk-stopwatch-sample' may be using a version of Gradle that does not contain the method. Gradle settings The build file may be missing a Gradle plugin. Apply Gradle plugin but i have installed the latest gradle plugin i.e 2.13, changed the classpath in build.gradle to 'com.android.tools

How to manually add Gradle module to Android project?

∥☆過路亽.° 提交于 2019-12-11 00:34:42
问题 I'm working on a project that was created before Gradle became the build system for Android development (LibreOffice Viewer for Android). When the project was migrated to Gradle, it didn't reorganize the folder structure to the new one Android is using, and so the Gradle config has things like: main.manifest.srcFile 'AndroidManifest.xml' main.assets.srcDirs = ['assets'] main.res.srcDirs = ['res'] main.java.srcDirs = ['../Bootstrap/src', 'src/java'] main.jniLibs.srcDirs = ['jniLibs'] in the

Adding a resource directory to classpath of greety (Gradle Plugin)

前提是你 提交于 2019-12-11 00:09:35
问题 I'm trying to run gradle with the plugin gretty using jetty . The problem is the gretty plugin does put the directory src/test/resources on the classpath and I need a lazy load for some .properties files on the Jetty startup. dependencies { gretty "com.zaxxer:HikariCP:${version_hikaricp}" gretty "org.hsqldb:hsqldb:${version_hsqldb}" gretty files("target/classes/main", "target/resources/main", "src/test/resources") } The code above is not loading the resources to the classpath to be used by

Android Project Error Execution failed for task ':transformClassesWithJarMergingForDebug'

天涯浪子 提交于 2019-12-10 23:34:46
问题 I was converting my android application from eclipse to Android Studio. When I built gradle there were no errors. But while running the application I got stuck with the following error: Error:Execution failed for task ':transformClassesWithJarMergingForDebug'. > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/xmlpull/v1/XmlPullParserException.class I tried to clean / rebuild project many times, but I always got the same error. I also tried