简体   繁体   中英

Google BigQuery into android project

I am trying to integrate the google BigQuery jav library into a java android project.

this is my gradle:

plugins {
    id 'com.android.application'
}

android {
    namespace 'com.example.myapplication'
    compileSdk 32

    defaultConfig {
        applicationId "com.example.myapplication"
        minSdk 21
        targetSdk 32
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }



    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

    packagingOptions {
        exclude 'META-INF/INDEX.LIST'
        exclude 'META-INF/DEPENDENCIES'

    }
}

configurations {

    cleanedAnnotations
    implementation.exclude group: 'com.google.auto.value', module: 'auto-value'
}

dependencies {

    implementation 'androidx.appcompat:appcompat:1.5.1'
    implementation 'com.google.android.material:material:1.7.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
    testImplementation 'junit:junit:4.13.2'
    androidTestImplementation 'androidx.test.ext:junit:1.1.4'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0'

    implementation platform('com.google.cloud:libraries-bom:26.1.4')
    implementation 'com.google.cloud:google-cloud-bigquery'
}

It syncs fine but when building the project I get the following error:

* What went wrong:
Execution failed for task ':app:mergeDebugJavaResource'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
   > 4 files found with path 'arrow-git.properties' from inputs:
      - C:\Users\marta.echevarria\.gradle\caches\modules-2\files-2.1\org.apache.arrow\arrow-vector\10.0.0\80827840cea658527dd06aef6567868bc4fa24a\arrow-vector-10.0.0.jar
      - C:\Users\marta.echevarria\.gradle\caches\modules-2\files-2.1\org.apache.arrow\arrow-format\10.0.0\c8e2d494a6f6ac39a3aa8961cf8a38c0a0e82dbb\arrow-format-10.0.0.jar
      - C:\Users\marta.echevarria\.gradle\caches\modules-2\files-2.1\org.apache.arrow\arrow-memory-core\10.0.0\79ab45e0a148b395cfb610767c7bcd08e90da623\arrow-memory-core-10.0.0.jar
      - C:\Users\marta.echevarria\.gradle\caches\modules-2\files-2.1\org.apache.arrow\arrow-memory-netty\10.0.0\faab301a8f950bfeefeef31447f426c2ea2d4c8c\arrow-memory-netty-10.0.0.jar

I have cleaned the project and reset caches without any result

Gradle version is 7.4 and I use Android Studio Dolphin | 2021.3.1 Patch 1

Try adding exclude 'arrow-git.properties' to android{packagingOptions{}} .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM