繁体   English   中英

Google BigQuery 进入 android 项目

[英]Google BigQuery into android project

我正在尝试将 google BigQuery jav 库集成到 java android 项目中。

这是我的 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'
}

它同步很好,但是在构建项目时出现以下错误:

* 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

我已经清理了项目并重置了缓存,但没有任何结果

Gradle 版本是7.4,我用的是Android Studio Dolphin | 2021.3.1 补丁 1

尝试将exclude 'arrow-git.properties'添加到android{packagingOptions{}}

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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