I use Android Annotations in some other projects too. But in this it won't generate my files.
I try to migrate from Eclipse to Android Studio.
I'm also updating my libraries.
In Eclipse everything was working fine.
Note: Resolve log file to C:\Users\Raphael\Documents\!!!PROG\Eclipse\ARBEIT\FlohmoAndroid\flohmoLI\build\generated\source\apt\androidannotations.log
Note: Initialize AndroidAnnotations 3.3.2 with options {androidManifestFile=C:\Users\Raphael\Documents\!!!PROG\Eclipse\ARBEIT\FlohmoAndroid\flohmoLI\build\intermediates\manifests\full\debug\AndroidManifest.xml, resourcePackageName=at.flohmo}
C:\Users\Raphael\Documents\!!!PROG\Eclipse\ARBEIT\FlohmoAndroid\flohmoLI\src\main\java\at\flohmo\push\PushIntentReceiver.java:14: error: cannot find symbol
import at.flohmo.AdvertDetailsActivity_;
^
symbol: class AdvertDetailsActivity_
location: package at.flohmo
C:\Users\Raphael\Documents\!!!PROG\Eclipse\ARBEIT\FlohmoAndroid\flohmoLI\src\main\java\at\flohmo\push\PushIntentReceiver.java:15: error: cannot find symbol
import at.flohmo.AngeboteActivity_;
^
symbol: class AngeboteActivity_
location: package at.flohmo
C:\Users\Raphael\Documents\!!!PROG\Eclipse\ARBEIT\FlohmoAndroid\flohmoLI\src\main\java\at\flohmo\push\PushIntentReceiver.java:16: error: cannot find symbol
import at.flohmo.ChatActivity_;
^
symbol: class ChatActivity_
location: package at.flohmo
C:\Users\Raphael\Documents\!!!PROG\Eclipse\ARBEIT\FlohmoAndroid\flohmoLI\src\main\java\at\flohmo\push\PushIntentReceiver.java:17: error: cannot find symbol
import at.flohmo.MainActivity_;
^
symbol: class MainActivity_
location: package at.flohmo
warning: The following options were not recognized by any processor: '[androidManifestFile, resourcePackageName]'
4 errors
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':flohmoLI:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
here the gradle files:
project gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath 'com.google.gms:google-services:1.3.0-beta1'
}
}
allprojects {
repositories {
maven { url "http://dl.bintray.com/urbanairship/android" }
maven { url "http://dl.bintray.com/populov/maven" }
jcenter()
mavenCentral()
}
}
app gradle
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'android-apt'
buildscript {
repositories {
mavenCentral()
}
dependencies {
// Since Android's Gradle plugin 0.11, you have to use android-apt >= 1.3
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.+'
}
}
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
resourcePackageName 'at.flohmo'
}
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "at.flohmo"
minSdkVersion 10
targetSdkVersion 22
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
}
def AAVersion = '3.3.2'
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
compile 'com.android.support:support-v4:22.0.0'
compile 'com.android.support:appcompat-v7:22.0.0'
compile 'com.google.code.gson:gson:2.3'
compile 'com.google.android.gms:play-services:7.8.0'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
compile 'com.nhaarman.listviewanimations:lib-core:3.1.0#aar'
compile 'com.nhaarman.listviewanimations:lib-manipulation:3.1.0#aar'
compile 'com.nhaarman.listviewanimations:lib-core-slh:3.1.0#aar'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.4'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.urbanairship.android:urbanairship-sdk:6.1.+'
compile 'com.viewpagerindicator:library:2.4.1#aar'
compile project(':flohmosimplecropimagelib')
compile project(':flohmoLibrarySlidingMenu')
compile project(':flohmoPullToRefreshLibrary')
compile files('libs/ADTECHMobileSDK.jar')
}
off-question: are there gradle projects for the last four compile requests?
I had the same problem I switched from repositories to be wrapped in allprojects block. That made it work.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.3'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
mavenLocal()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I'll try to remove specific section apt... See my last question, may you find something useful.
I'm answer without computer in front ;)
Related
I'm running tests on android using gradle and we're migrating our framework to junit5 to take advantage of some of it's tagging and filtering capabilities. I've created the dependencies in my build.gradle files and I'm able to get it to build and run using the gutter icon in android studio, but I'm unable to run my tests from the command line. I get the following error.
* What went wrong:
Execution failed for task ':app:compileTestKotlin'.
> Could not resolve all files for configuration ':app:testCompileClasspath'.
> Could not find junit:junit:5.7.0.
Searched in the following locations:
- https://jcenter.bintray.com/junit/junit/5.7.0/junit-5.7.0.pom
- https://jcenter.bintray.com/junit/junit/5.7.0/junit-5.7.0.jar
- https://repo.maven.apache.org/maven2/junit/junit/5.7.0/junit-5.7.0.pom
- https://repo.maven.apache.org/maven2/junit/junit/5.7.0/junit-5.7.0.jar
Required by:
project :app
Here's my build.gradle at the app level
plugins {
id 'io.qameta.allure' version '2.8.1' // Latest Plugin Version
id 'java'
}
allure {
autoconfigure = true
version = '2.13.7' // Latest Allure Version
useJUnit5 {
version = '2.13.7' // Latest Allure Version
}
}
sourceCompatibility = 1.8
repositories {
jcenter()
mavenCentral()
}
dependencies {
testImplementation(
'org.junit.jupiter:junit-jupiter-params:5.7.0',
'org.junit.jupiter:junit-jupiter-api:5.7.0'
)
testRuntimeOnly(
'org.junit.jupiter:junit-jupiter-engine:5.7.0'
)
}
test {
useJUnitPlatform(){
includeEngines 'junit-jupiter'
}
}
apply plugin: 'kotlin'
test {
systemProperty 'platform', project.findProperty('platform')
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.1'
implementation "io.appium:java-client:7.2.0"
// implementation 'junit:junit:4.12'
implementation 'junit:junit:5.7.0'
}
and here's the build.gradle at the project level.
buildscript {
ext.kotlin_version = '1.3.72'
repositories {
google()
jcenter()
}
dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
The error message says it. implementation 'junit:junit:5.7.0' is a non-existing dependency. Leave it away and it might already work.
I attempted to import a project that Udacity's android course provided, but there were some issues. In the build.grade(app module) I changed compile toimplementation and testCompile to testImplementation. The project synced successfully, but when I executed the project on the emulator it gave me the following errors.
Could not find com.android.tools.build:aapt2:3.3.1-5013011.
Searched in the following locations:
- file:/C:/Users/root/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011.pom
- file:/C:/Users/root/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011-windows.jar
- file:/C:/Users/root/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011.pom
- file:/C:/Users/root/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011-windows.jar
- file:/C:/Users/root/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011.pom
- file:/C:/Users/root/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011-windows.jar
- https://jcenter.bintray.com/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011.pom
- https://jcenter.bintray.com/com/android/tools/build/aapt2/3.3.1-5013011/aapt2-3.3.1-5013011-windows.jar
Required by:
project :app
I think the required libraries needed to build cannot be found, but I don't know how to solve this. I googled the problem, but I can't find a solution.
My build.gradle file is this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
defaultConfig {
applicationId "com.example.android.miwok"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
testImplementation 'junit:junit:4.12'
api 'com.android.support:appcompat-v7:23.3.0'
api 'com.android.support:support-v4:23.3.0'
api 'com.android.support:design:23.3.0'
}
build.grade(project) is:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Beginning with Android Studio 3.2, the source for AAPT2 (Android Asset Packaging Tool 2) is Google's Maven repository.
To use AAPT2, make sure that you have a google() dependency in your build.gradle file.
allprojects {
repositories {
google()
jcenter()
}
}
Check the official documentation.
The AAPT2 (Android Asset Packaging Tool) is a build tool that Android Studio and Android Gradle Plugin.
Android Gradle Plugin 3.0.0 and higher enable AAPT2 by default.
With Android Studio 3.2 to use AAPT2, make sure that you have a google() dependency in your build.gradle:
buildscript {
repositories {
google() // here
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
} allprojects {
repositories {
google() // and here
jcenter()
}
I created a project with Android Studio Preview 3.0 (Canary 2) to start Kotlin development. I used the Android Studio Fabric Plugin to setup Fabric for my project.
But when I want to upload a beta version of my app to Fabric Beta (Crashlytics) with the following command
./gradlew crashlyticsUploadDistributionDebug
I receive the following error:
Configuration 'compile' in project ':app' is deprecated. Use
'implementation' instead. Configuration 'testCompile' in project
':app' is deprecated. Use 'testImplementation' instead. The
Task.leftShift(Closure) method has been deprecated and is scheduled to
be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
registerResGeneratingTask is deprecated, use
registerGeneratedFolders(FileCollection) registerResGeneratingTask is
deprecated, use registerGeneratedFolders(FileCollection)
:app:crashlyticsUploadDistributionDebug FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:crashlyticsUploadDistributionDebug'.
Not valid.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED in 1s 1 actionable task: 1 executed, 0 avoided (0%)
I do not have any idea, what "Not valid" means.
This is my root build.gradle:
buildscript {
ext.kotlin_version = '1.1.2-4'
repositories {
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.ajoberstar:grgit:1.9.0'
classpath 'io.fabric.tools:gradle:1.22.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
ext {
supportLibVersion = "25.3.1"
buildVersion = "25.0.3"
daggerVersion = "2.9"
rxJavaVersion = "2.1.0"
rxAndroidVersion = "2.0.1"
countGitCommits = { ->
git = Grgit.open()
def commitCount = git.log(includes: ['HEAD']).size()
println("INFO: Number of commits $commitCount")
return commitCount
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And this is the app build.gradle
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
android {
compileSdkVersion 25
buildToolsVersion "$buildVersion"
defaultConfig {
applicationId "com.kotlin.sample"
minSdkVersion 21
targetSdkVersion 25
def numberOfCommits = countGitCommits()
versionCode 1000 + numberOfCommits
versionName "0.1.$numberOfCommits"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile files('libs/API_ADK.jar')
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "com.android.support:appcompat-v7:$supportLibVersion"
compile "com.android.support:support-v4:$supportLibVersion"
compile "com.android.support:design:$supportLibVersion"
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'io.reactivex.rxjava2:rxkotlin:2.0.3'
compile "io.reactivex.rxjava2:rxandroid:$rxAndroidVersion"
compile "io.reactivex.rxjava2:rxjava:$rxJavaVersion"
compile 'com.jakewharton.timber:timber:4.5.1'
compile "com.google.dagger:dagger:$daggerVersion"
// Needed for #Generated annotation (missing in Java <= 1.6; therefore, Android)
compile 'javax.annotation:jsr250-api:1.0'
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true;
}
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
testCompile 'junit:junit:4.12'
}
The fabric.properties file with the apiSecret is also placed in the project.
Edit:
A manual upload of the APK to Fabric Beta works.
I just want to point to the comment from Mike Bonnell as it answers this question:
Our command line tools are not compatible with the Alpha version of Gradle 3. We're looking into the changes that have come with the alpha versions, but we test against betas and stable versions of the releases.
Edit 2017/08/25
Tried with Android Studio 3.0 Beta 3 and the corresponding android gradle plugin. The gradle task crashlyticsUploadDistributionDebug seems to work again.
I updated my project from android studio 2.2 to android studio 2.3 and incremented the project from kotlin 1.06 to kotlin 1.1
This is the error I get
:app:javaPreCompileDebug
:app:transformClassesAndDataBindingWithDataBindingMergeArtifactsForDebug UP-TO-DATE
:app:compileDebugKotlin
w: The '-d' option with a directory destination is ignored because '-module' is specified
:app:compileDebugJavaWithJavac
Processor path was modified by kapt. Previous value = /home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre7/1.1.0/ef03cfed144ff47eed2cab1f7be4381bc18a6237/kotlin-stdlib-jre7-1.1.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/android/databinding/compilerCommon/2.3.0/compilerCommon-2.3.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/commons-codec/commons-codec/1.10/commons-codec-1.10.jar:/home/harisvsulaiman/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.1/constraint-layout-solver-1.0.1.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/google/guava/guava/17.0/guava-17.0.jar:/home/harisvsulaiman/Sdk/extras/android/m2repository/com/android/support/support-annotations/25.2.0/support-annotations-25.2.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.0/96a07041a11a09cf578892932d7511e1e11e3b6c/kotlin-stdlib-1.1.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/android/databinding/baseLibrary/2.3.0/baseLibrary-2.3.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.airbnb.android/epoxy-annotations/1.7.5/509abda14719aa31f55123c9a757bdadc8f45818/epoxy-annotations-1.7.5.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.realm/realm-annotations-processor/3.0.0/61c2ac9e7a068736558e69d585cfa777b35058b2/realm-annotations-processor-3.0.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/android/tools/annotations/24.5.0/annotations-24.5.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.7.0/9e9eeaf9948ee4d6c3ab354e8dc14368f16994a4/glide-3.7.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.2.6/de0c509ae6c9db5b5b6004a9d102c92708346f7c/rxjava-1.2.6.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.11.0/840897fcd7223a8143f1d9b6f69714e7be34fd50/okio-1.11.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/adapter-rxjava/2.2.0/d80514b6f44f0c4c6234e2d67fea783a25e77275/adapter-rxjava-2.2.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/googlecode/juniversalchardet/juniversalchardet/1.0.3/juniversalchardet-1.0.3.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/android/databinding/compiler/2.3.0/compiler-2.3.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.realm/realm-annotations/3.0.0/32a01bbb8cb421b6d53d7a102412142b0391c8c7/realm-annotations-3.0.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/org/antlr/antlr4/4.5.3/antlr4-4.5.3.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.2.0/41e67dba73c3347e4503761642c39d0e06ca1f2/retrofit-2.2.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.6.0/69edde9fc4b01c9fd51d25b83428837478c27254/okhttp-3.6.0.jar:/home/harisvsulaiman/.android/build-cache/478fd1ace0e77af57c87f42a281aed180d5ce276/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/d7d6ec093cb49766f796118979b331d6f5c2b4c4/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.realm/realm-annotations/3.0.0/32a01bbb8cb421b6d53d7a102412142b0391c8c7/realm-annotations-3.0.0.jar:/home/harisvsulaiman/.android/build-cache/17205aea1b3195cf38fb66c2e060ee4beed141f8/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/adapter-rxjava/2.2.0/d80514b6f44f0c4c6234e2d67fea783a25e77275/adapter-rxjava-2.2.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.2.0/41e67dba73c3347e4503761642c39d0e06ca1f2/retrofit-2.2.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.6.0/69edde9fc4b01c9fd51d25b83428837478c27254/okhttp-3.6.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.11.0/840897fcd7223a8143f1d9b6f69714e7be34fd50/okio-1.11.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.2.6/de0c509ae6c9db5b5b6004a9d102c92708346f7c/rxjava-1.2.6.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.7.0/9e9eeaf9948ee4d6c3ab354e8dc14368f16994a4/glide-3.7.0.jar:/home/harisvsulaiman/.android/build-cache/6249fbc26c3c324164d6bccd213e772dbffabab8/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/00346f3603afd369923753ca5b3574b3cbd68913/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/44456db0af44370448077b85155ec1b111460aaf/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/ab1b9ebddb2122246c96bfd338f92a2af4329445/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.airbnb.android/epoxy-annotations/1.7.5/509abda14719aa31f55123c9a757bdadc8f45818/epoxy-annotations-1.7.5.jar:/home/harisvsulaiman/.android/build-cache/fb128d6e98efde38d1b59985fb85f2eee1b186eb/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/c9550d2fd003ae92d1406c8c46f2b35cffe031ce/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/08e46ece36546bbc2b85ffa90c6a8a4cf3bbab10/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/b293042c81288354130e748246586e2669e423d1/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/6a84f4dc5c9dda9b0a661c34b982f15791783194/output/jars/classes.jar:/home/harisvsulaiman/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.1/constraint-layout-solver-1.0.1.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre7/1.1.0/ef03cfed144ff47eed2cab1f7be4381bc18a6237/kotlin-stdlib-jre7-1.1.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.0/96a07041a11a09cf578892932d7511e1e11e3b6c/kotlin-stdlib-1.1.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/home/harisvsulaiman/.android/build-cache/79467da2ee5fd2328774a23645475ecb9d0946fd/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/02c10559b235748437a45d6ca44f6c5e5230c4e9/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/82bf4ec6a1051c7130958118c35d8fb99643c133/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/8dd8873d08fda228f6ea3117e6073fd14e35a5d4/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/8fc507ef1c90eab75de9d0123ad4b7535753f320/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/5fb2bef0cb0bba8cf7f981cadcf1cf142a325276/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/0727c2e3f4507058ea7ae52687ced332bf06362f/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/31d4c76434ce8a5ba46bf630f178e855f7516250/output/jars/classes.jar:/home/harisvsulaiman/Sdk/extras/android/m2repository/com/android/support/support-annotations/25.2.0/support-annotations-25.2.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/android/databinding/baseLibrary/2.3.0/baseLibrary-2.3.0.jar
Destination for generated sources was modified by kapt. Previous value = /home/harisvsulaiman/AndroidStudioProjects/Hafiz/app/build/generated/source/apt/debug
:app:compileDebugKotlinAfterJava
w: The '-d' option with a directory destination is ignored because '-module' is specified
:app:copyDebugKotlinClasses UP-TO-DATE
:app:compileDebugNdk UP-TO-DATE
:app:compileDebugSources
:app:incrementalDebugUnitTestJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileDebugUnitTest
:app:compileDebugUnitTestKotlin UP-TO-DATE
:app:compileDebugUnitTestJavaWithJavac UP-TO-DATE
:app:compileDebugUnitTestKotlinAfterJava UP-TO-DATE
:app:copyDebugUnitTestKotlinClasses UP-TO-DATE
:app:processDebugJavaRes UP-TO-DATE
:app:processDebugUnitTestJavaRes UP-TO-DATE
:app:compileDebugUnitTestSources UP-TO-DATE
:app:incrementalDebugAndroidTestJavaCompilationSafeguard UP-TO-DATE
:app:javaPreCompileDebugAndroidTest
:app:compileDebugAndroidTestKotlin
:app:compileDebugAndroidTestJavaWithJavac
Processor path was modified by kapt. Previous value = /home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/2.0.1/516c03b21d50a644d538de0f0369c620989cd8f0/jsr305-2.0.1.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.realm/realm-annotations-processor/3.0.0/61c2ac9e7a068736558e69d585cfa777b35058b2/realm-annotations-processor-3.0.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/javax.annotation/javax.annotation-api/1.2/479c1e06db31c432330183f5cae684163f186146/javax.annotation-api-1.2.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-integration/1.3/5de0c73fef18917cd85d0ab70bb23818685e4dfd/hamcrest-integration-1.3.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.realm/realm-annotations/3.0.0/32a01bbb8cb421b6d53d7a102412142b0391c8c7/realm-annotations-3.0.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/4785a3c21320980282f9f33d0d1264a69040538f/hamcrest-library-1.3.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/squareup/javawriter/2.5.0/javawriter-2.5.0.jar:/home/harisvsulaiman/.android/build-cache/12537e43a85ab0afa777ffffaa3156b34b448f54/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup/javawriter/2.1.1/67ff45d9ae02e583d0f9b3432a5ebbe05c30c966/javawriter-2.1.1.jar:/home/harisvsulaiman/.android/build-cache/793aa84797fecdb3ba2f8477970a8b447c352cbd/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/ce412e8a194fce2780827ef6800ab6ff4b18323d/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/junit/junit/4.12/2973d150c0dc1fefe998f834810d68f278ea58ec/junit-4.12.jar:/home/harisvsulaiman/.android/build-cache/7e420608fba4187802d4eaa0ca3d7f5c55016f84/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/javax.inject/javax.inject/1/6975da39a7040257bd51d21a231b76c915872d38/javax.inject-1.jar:/home/harisvsulaiman/.android/build-cache/44be9593d071350b5f9d23c72dca4110a3c5e62a/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-integration/1.3/5de0c73fef18917cd85d0ab70bb23818685e4dfd/hamcrest-integration-1.3.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-library/1.3/4785a3c21320980282f9f33d0d1264a69040538f/hamcrest-library-1.3.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.hamcrest/hamcrest-core/1.3/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.google.code.findbugs/jsr305/2.0.1/516c03b21d50a644d538de0f0369c620989cd8f0/jsr305-2.0.1.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/javax.annotation/javax.annotation-api/1.2/479c1e06db31c432330183f5cae684163f186146/javax.annotation-api-1.2.jar:/home/harisvsulaiman/.android/build-cache/478fd1ace0e77af57c87f42a281aed180d5ce276/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/d7d6ec093cb49766f796118979b331d6f5c2b4c4/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.realm/realm-annotations/3.0.0/32a01bbb8cb421b6d53d7a102412142b0391c8c7/realm-annotations-3.0.0.jar:/home/harisvsulaiman/.android/build-cache/17205aea1b3195cf38fb66c2e060ee4beed141f8/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/adapter-rxjava/2.2.0/d80514b6f44f0c4c6234e2d67fea783a25e77275/adapter-rxjava-2.2.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.retrofit2/retrofit/2.2.0/41e67dba73c3347e4503761642c39d0e06ca1f2/retrofit-2.2.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.okhttp3/okhttp/3.6.0/69edde9fc4b01c9fd51d25b83428837478c27254/okhttp-3.6.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.squareup.okio/okio/1.11.0/840897fcd7223a8143f1d9b6f69714e7be34fd50/okio-1.11.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/io.reactivex/rxjava/1.2.6/de0c509ae6c9db5b5b6004a9d102c92708346f7c/rxjava-1.2.6.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.github.bumptech.glide/glide/3.7.0/9e9eeaf9948ee4d6c3ab354e8dc14368f16994a4/glide-3.7.0.jar:/home/harisvsulaiman/.android/build-cache/6249fbc26c3c324164d6bccd213e772dbffabab8/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/00346f3603afd369923753ca5b3574b3cbd68913/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/44456db0af44370448077b85155ec1b111460aaf/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/ab1b9ebddb2122246c96bfd338f92a2af4329445/output/jars/classes.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/com.airbnb.android/epoxy-annotations/1.7.5/509abda14719aa31f55123c9a757bdadc8f45818/epoxy-annotations-1.7.5.jar:/home/harisvsulaiman/.android/build-cache/fb128d6e98efde38d1b59985fb85f2eee1b186eb/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/c9550d2fd003ae92d1406c8c46f2b35cffe031ce/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/08e46ece36546bbc2b85ffa90c6a8a4cf3bbab10/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/b293042c81288354130e748246586e2669e423d1/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/6a84f4dc5c9dda9b0a661c34b982f15791783194/output/jars/classes.jar:/home/harisvsulaiman/Sdk/extras/m2repository/com/android/support/constraint/constraint-layout-solver/1.0.1/constraint-layout-solver-1.0.1.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-jre7/1.1.0/ef03cfed144ff47eed2cab1f7be4381bc18a6237/kotlin-stdlib-jre7-1.1.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.1.0/96a07041a11a09cf578892932d7511e1e11e3b6c/kotlin-stdlib-1.1.0.jar:/home/harisvsulaiman/.gradle/caches/modules-2/files-2.1/org.jetbrains/annotations/13.0/919f0dfe192fb4e063e7dacadee7f8bb9a2672a9/annotations-13.0.jar:/home/harisvsulaiman/.android/build-cache/79467da2ee5fd2328774a23645475ecb9d0946fd/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/02c10559b235748437a45d6ca44f6c5e5230c4e9/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/82bf4ec6a1051c7130958118c35d8fb99643c133/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/8dd8873d08fda228f6ea3117e6073fd14e35a5d4/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/8fc507ef1c90eab75de9d0123ad4b7535753f320/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/5fb2bef0cb0bba8cf7f981cadcf1cf142a325276/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/0727c2e3f4507058ea7ae52687ced332bf06362f/output/jars/classes.jar:/home/harisvsulaiman/.android/build-cache/31d4c76434ce8a5ba46bf630f178e855f7516250/output/jars/classes.jar:/home/harisvsulaiman/Sdk/extras/android/m2repository/com/android/support/support-annotations/25.2.0/support-annotations-25.2.0.jar:/home/harisvsulaiman/android-studio/gradle/m2repository/com/android/databinding/baseLibrary/2.3.0/baseLibrary-2.3.0.jar:/home/harisvsulaiman/AndroidStudioProjects/Hafiz/app/build/intermediates/classes/debug
Destination for generated sources was modified by kapt. Previous value = /home/harisvsulaiman/AndroidStudioProjects/Hafiz/app/build/generated/source/apt/androidTest/debug
:app:compileDebugAndroidTestJavaWithJavac FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugAndroidTestJavaWithJavac'.
> java.lang.RuntimeException: Failed to parse data binding compiler options. Params:
kapt.annotations : /home/harisvsulaiman/AndroidStudioProjects/Hafiz/app/build/tmp/kapt/debugAndroidTest/wrappers/annotations.debugAndroidTest.txt
kapt.kotlin.generated : /home/harisvsulaiman/AndroidStudioProjects/Hafiz/app/build/tmp/kapt/debugAndroidTest/kotlinGenerated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
build.gradle File:
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
apply plugin: 'kotlin-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.spar.hafiz"
minSdkVersion 17
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables {
useSupportLibrary true
}
}
dataBinding {
enabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
kapt 'com.android.databinding:compiler:2.3.0'
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile 'com.squareup.retrofit2:retrofit:2.2.0'
compile 'io.reactivex:rxjava:1.2.6'
compile 'com.synnapps:carouselview:0.0.10'
compile 'com.squareup.retrofit2:adapter-rxjava:2.2.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.airbnb.android:epoxy:1.7.5'
testCompile 'junit:junit:4.12'
kapt 'com.airbnb.android:epoxy-processor:1.7.5'
compile 'com.android.support:support-v4:25.2.0'
compile 'com.android.support:appcompat-v7:25.2.0'
compile 'com.android.support:cardview-v7:25.2.0'
compile 'com.android.support.constraint:constraint-layout:1.0.1'
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
}
kapt {
generateStubs = true
}
repositories {
mavenCentral()
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.0'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath "io.realm:realm-gradle-plugin:3.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = '1.1.0'
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
classpath "io.realm:realm-gradle-plugin:3.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I had solved same issue.
Delete this code.
kapt {
generateStubs = true
}
And add this code.
apply plugin: 'kotlin-kapt'
Reference Links: https://blog.jetbrains.com/kotlin/2016/09/kotlin-1-0-4-is-here/
I have a project that need to use protobuf (Getting the objects from server and parsing them).
For that I configured the following things:
Project level gradle.build
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.0'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.7.0'
classpath 'com.google.protobuf:protobuf-java:2.6.1'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
App level gradle.build
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.protobuf'
android {
...
}
protobuf {
protoc {
artifact = 'com.google.protobuf:protoc:2.6.1'
}
}
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.google.protobuf:protobuf-java:2.6.1'
compile 'com.google.protobuf:protobuf-gradle-plugin:0.7.0'
}
I put my proto file under .../app/src/main/proto/FILE.proto.
Once i am trying to build the project I am getting the following error:
Error:Execution failed for task ':app:generateDebugProto'.
> protoc: stdout: . stderr: /Users/XX/YY/app/build/extracted-protos/main: warning: directory does not exist.
/Users/XX/YY/app/build/extracted-include-protos/main: warning: directory does not exist.
...
protoc-gen-javanano: program not found or is not executable
--javanano_out: protoc-gen-javanano: Plugin failed with status code 1.
Any idea why is that? It should use the protoc from the repo and is should support that nano compilation.
Thanks.
Finally i downloaded the source from GitHub and compiled it. It fixed the issue because it includes the missing binary.