Ошибка сборки Flutter в Android: не удалось выполнить задачу «:package_info_plus:compileReleaseJavaWithJavac». > ошибка:JAVA

Программисты JAVA общаются здесь
Ответить Пред. темаСлед. тема
Anonymous
 Ошибка сборки Flutter в Android: не удалось выполнить задачу «:package_info_plus:compileReleaseJavaWithJavac». > ошибка:

Сообщение Anonymous »

Я пытался развернуть бета-версию Android с помощью fastlane. Однако я столкнулся с ситуацией, когда развертывание не продолжилось из-за той же ошибки.
Это мои предпочтения.
package_info_plus: 6.0. 0 || 7.0.0 || 8.0.0
Я попробовал все три версии, но они не сработали
Я также добавил эти вещи в gradle-wrapper.properties

Код: Выделить всё

distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-all.zip (or 8.0)
android.suppressUnsupportedCompileSdk=34
Файл app/build.gradle
Изначально это была версия 1.8, но я попробовал изменить ее на 17, но все равно не помогло.< /p>

Код: Выделить всё

android {
namespace "com.example.app"
compileSdkVersion flutter.compileSdkVersion
ndkVersion flutter.ndkVersion

compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}

kotlinOptions {
jvmTarget = '17'
}

sourceSets {
main.java.srcDirs += 'src/main/kotlin'
}

defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.app"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
minSdkVersion 21
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
multiDexEnabled true
}

настройка

Gradle 8.0
Kotlin: 1.8.10Groovy: 3.0.13
Ant: Apache Ant(TM) версии 1.10.11, скомпилированный 10 июля 2021 г.
JVM: 11.0.11 (AdoptOpenJDK 11.0.11+9)
ОС : Mac OS X 11.0 x86_64
Структура проекта – SDK -> jbr-17
  • ошибка –

Код: Выделить всё

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':package_info_plus:compileReleaseJavaWithJavac'.
> error: invalid source release: 17

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
>  Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 49s
752 actionable tasks: 11 executed, 741 up-to-date

from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane_core/lib/fastlane_core/ui/ui.rb:17:in `method_missing'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/helper/sh_helper.rb:80:in `sh_control_output'
from /opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/forwardable.rb:240:in `sh'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/helper/gradle_helper.rb:32:in `trigger'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/actions/gradle.rb:60:in `run'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:263:in `block (2 levels) in execute_action'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in `execute_action'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:255:in `block in execute_action'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:229:in `chdir'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:229:in `execute_action'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:157:in `trigger_action_by_name'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/fast_file.rb:159:in `method_missing'
from Fastfile:28:in `block (2 levels) in parsing_binding'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/lane.rb:41:in `call'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:49:in `block in execute'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:45:in `chdir'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/runner.rb:45:in `execute'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/lane_manager.rb:46:in `cruise_lane'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/command_line_handler.rb:34:in `handle'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:110:in `block (2 levels) in run'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:187:in `call'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/commander-4.6.0/lib/commander/command.rb:157:in `run'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/commander-4.6.0/lib/commander/runner.rb:444:in `run_active_command'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:124:in `run!'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/commander-4.6.0/lib/commander/delegates.rb:18:in `run!'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:363:in `run'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/commands_generator.rb:43:in `start'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/fastlane/lib/fastlane/cli_tools_distributor.rb:123:in `take_off'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/gems/fastlane-2.220.0/bin/fastlane:23:in `'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/bin/fastlane:25:in `load'
from /opt/homebrew/Cellar/fastlane/2.220.0/libexec/bin/fastlane:25:in `'
Я пробовал менять версии многих вещей, включая среду jvm, но это все равно не помогло.

Подробнее здесь: https://stackoverflow.com/questions/785 ... info-plusc
Реклама
Ответить Пред. темаСлед. тема

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

  • Похожие темы
    Ответы
    Просмотры
    Последнее сообщение

Вернуться в «JAVA»