首页 > 解决方案 > 如何使用 Android Studio 为 Flutter 库创建 .jar 文件

问题描述

我做了“编写你的第一个 Flutter 应用程序,第 1 部分”。

有关于如何为 Java 项目执行此操作的说明,但这是使用 Flutter,我尝试了其他解决方案,但它不起作用。

在项目-> 外部库中,我有这 3 个库:

  1. 飞镖包
  2. 飞镖 SDK
  3. 颤振安卓版

有没有办法为具有 3 个库的项目生成 .jar?

这是当前的 build.gradle

buildscript {
    ext.kotlin_version = '1.2.30'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

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

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

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

我正在使用 AD 3.2.1

标签: android-studiojarflutter

解决方案


推荐阅读