Im getting Application Install Fail error i have tried device and emulator.
i got this couple of waring in messages. (GithubBrowserSample)
~
Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:compileDebugSources, :app:compileDebugAndroidTestSources, :app:compileDebugUnitTestSources]
Warning:Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'
/Users/shanuka/android-architecture-components/GithubBrowserSample/app/src/main/java/com/android/example/github/db/GithubDb.java
Warning:(33, 17) Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide room.schemaLocation annotation processor argument OR set exportSchema to false.
Warning:Supported source version 'RELEASE_7' from annotation processor 'android.arch.lifecycle.LifecycleProcessor' less than -source '1.8'
~
I created a PR(https://github.com/googlesamples/android-architecture-components/pull/6) that fixes the build
Install issue fixed by PR#7 for the GithubBrowserSample
I still have this problem. I am using:
classpath 'com.android.tools.build:gradle:3.0.0-alpha5'
and Kotlin
My error is:
Warning:warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.lifecycle.LifecycleProcessor' less than -source '1.8'
Warning:warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'
Error:Execution failed for task ':app:kaptDebugKotlin'.
Internal compiler error. See log for more details
Try adding the following to the android block in your build.gradle file. Example here).
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
If you run into this again, make sure you are always using the latest gradle releases... I was getting this until I just updated my wrapper to distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-rc-2-all.zip
Thanks for the suggestion. I tried updating to rc2 - and it DID fix my junit failures - the
dao = mock(RepoDao.class);
was failing deep inside byte-buddy mysteriously in my derivative project. Dunno if rc2 fixed it or masked the problem. BUT I am still seeing the RELEASE_7 error.
Compiling with source level 1.8 and target level 1.8.
warning: Supported source version 'RELEASE_7' from annotation processor
'android.arch.persistence.room.RoomProcessor' less than -source '1.8'
C:\Users\Jim\Desktop\AS22-active\PopM\app\src\main\java\com\jimandreas\aarch\popm\db\GithubDb.java:44: warning: Schema export directory is not provided to the annotation processor so we cannot export the schema. You can either provide `room.schemaLocation` annotation processor argument OR set exportSchema to false.
public abstract class GithubDb extends RoomDatabase {
^
warning: Supported source version 'RELEASE_7' from annotation processor
'android.arch.lifecycle.LifecycleProcessor' less than -source '1.8'
I also have same issue with Room. I tried to Invalidate and restart, but it doesn't help.
My gradle-wrapper version is 4.1-all.
This is my message after build:
Warning:Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'
Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
def architectureVersion = '1.0.0-rc1'
implementation "android.arch.persistence.room:runtime:$architectureVersion"
implementation "android.arch.persistence.room:rxjava2:$architectureVersion"
annotationProcessor "android.arch.persistence.room:compiler:$architectureVersion"
and project level build.gradle file contains that:
allprojects {
repositories {
jcenter()
maven { url "https://jitpack.io" }
maven { url 'https://maven.google.com' }
}
}
@kronismax have you tried a simple Clean Project and then rebuild?
@codeversed Of course, every time I try to change something I'm doing this.
@kronismax - Just checking the basics... sometimes I see better results from clean project rather than invalidate... but could be just in my head lol.
Side note, I am using arch version: 1.0.0-alpha9-1
I am currently NOT using room:rxjava2 but I am using reactivex.rxjava2. Not sure if those could be conflict but maybe test without that dependency to see if it is a conflict?... if the version update does not fix the issue.
@codeversed Where did you find reactivex.rxjava2 instead room:rxjava2 ?
And I don't use any other architecture components with the exception of Room.
@kronismax - I have been using these longer than the room:rxjava2 so I just have not got around to testing that yet. Here is what I use currently:
ext.rx_android_version = '2.0.1'
ext.rx_java_version = '2.1.3'
compile "io.reactivex.rxjava2:rxandroid:$rx_android_version"
compile "io.reactivex.rxjava2:rxjava:$rx_java_version"
@codeversed I use multidex and it started to build, but I don't understand why it didn't build before because I am not using so many methods. And log didn't say that I need multidex.
That's the answer, and it is helpful for somebody. https://stackoverflow.com/a/46591042/6593086
Most helpful comment
I still have this problem. I am using:
classpath 'com.android.tools.build:gradle:3.0.0-alpha5'
and Kotlin
My error is:
Warning:warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.lifecycle.LifecycleProcessor' less than -source '1.8'
Warning:warning: Supported source version 'RELEASE_7' from annotation processor 'android.arch.persistence.room.RoomProcessor' less than -source '1.8'
Error:Execution failed for task ':app:kaptDebugKotlin'.