首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Chaquopy构建失败:app:generateDebugPythonMiscAsset

Chaquopy构建失败:app:generateDebugPythonMiscAsset
EN

Stack Overflow用户
提问于 2020-05-23 14:07:17
回答 1查看 455关注 0票数 1

我正在创建一个kotlin前端/python后端android应用程序,并希望使用Chaqu皮,但我得到了以下错误。相信我正确地遵循了https://chaquo.com/chaquopy/doc/current/android.html#development上的说明,但是我一直在得到这个错误。非常感谢。

代码语言:javascript
复制
:app:generateDebugPythonMiscAssets
Could not resolve com.chaquo.python:target:3.8.1-7

你能告诉我如何解决这个问题吗?

格拉德斯(app):

代码语言:javascript
复制
plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-android-extensions'
    id 'com.chaquo.python'
}

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.3"

    defaultConfig {
        applicationId "com.example.inprogress"
        minSdkVersion 25
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        sourceSets {
            main {
                python {
                    srcDirs = ["replacement/dir"]
                    srcDir "additional/dir"
                }
            }
        }
        ndk {
            abiFilters "armeabi-v7a", "x86"
        }

    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = '1.8'
    }
}

dependencies {

    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.2.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'com.google.android.material:material:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    //noinspection GradleDependency
    implementation "com.squareup.okhttp3:okhttp:3.9.1"
    //noinspection GradleDependency
    implementation 'com.google.code.gson:gson:2.8.0'
}

分级(项目):

代码语言:javascript
复制
buildscript {
    ext.kotlin_version = "1.3.61"
    repositories {
        google()
        jcenter()
        maven { url "https://chaquo.com/maven" }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0-alpha04'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "com.chaquo.python:gradle:7.0.3"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-05-23 14:33:19

Chaqu皮不支持Android插件的预发布版本,你应该收到一个警告。

下面是解决这个问题的方法:

当Chaqu皮增加对Android插件新版本的支持时,它将在变更日志本汇总表中发布。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61973252

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档