Flutter 集成腾迅 IM Demo 时不同的编译配置的连环坑 2021-12-17

Flutter 集成腾迅 IM Demo 时不同的编译配置的连环坑 2021-12-17,第1张

java_objectc java 坑一 minSdkVersion 19
➜  java_objectc flutter run
Multiple devices found:
sdk gphone x86 (mobile) • emulator-5554                        • android-x86 • Android 11 (API 30) (emulator)
iPhone 8 Plus (mobile)  • C235F27E-F408-44E4-8223-43F4C4846E28 • ios         • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
[1]: sdk gphone x86 (emulator-5554)
[2]: iPhone 8 Plus (C235F27E-F408-44E4-8223-43F4C4846E28)
Please choose one (To quit, press "q/Q"): 1
Running "flutter pub get" in java_objectc...                           ⣟
 1,411ms
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on sdk gphone x86 in debug mode...
/Users/swot/learn/flutter/java_objectc/android/app/src/debug/AndroidManifest.xml Error:
	uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:flutter_plugin_record] /Users/swot/learn/flutter/java_objectc/build/flutter_plugin_record/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16
	Suggestion: use a compatible library with a minSdk of at most 16,
		or increase this project's minSdk version to at least 19,
		or use tools:overrideLibrary="record.wilson.flutter.com.flutter_plugin_record" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:flutter_plugin_record] /Users/swot/learn/flutter/java_objectc/build/flutter_plugin_record/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16
  	Suggestion: use a compatible library with a minSdk of at most 16,
  		or increase this project's minSdk version to at least 19,
  		or use tools:overrideLibrary="record.wilson.flutter.com.flutter_plugin_record" to force usage (may lead to runtime failures)

* 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 37s
Running Gradle task 'assembleDebug'...                             67.5s

The plugin flutter_plugin_record requires a higher Android SDK version.
Fix this issue by adding the following to the file /Users/swot/learn/flutter/java_objectc/android/app/build.gradle:
android {
  defaultConfig {
    minSdkVersion 19
  }
}


Note that your app won't be available to users running Android SDKs below 19.
Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.
Exception: Gradle task assembleDebug failed with exit code 1
处理 minSdkVersion 19
nvim /Users/swot/learn/flutter/java_objectc/android/app/build.gradle

change 16 to 19

minSdkVersion 16
minSdkVersion 19
坑二 add ‘tools:replace=“android:label”’
➜  java_objectc flutter run
Multiple devices found:
sdk gphone x86 (mobile) • emulator-5554                        • android-x86 • Android 11 (API 30) (emulator)
iPhone 8 Plus (mobile)  • C235F27E-F408-44E4-8223-43F4C4846E28 • ios         • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
[1]: sdk gphone x86 (emulator-5554)
[2]: iPhone 8 Plus (C235F27E-F408-44E4-8223-43F4C4846E28)
Please choose one (To quit, press "q/Q"): 1
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on sdk gphone x86 in debug mode...
/Users/swot/learn/flutter/java_objectc/android/app/src/debug/AndroidManifest.xml:4:9-37 Error:
	Attribute application@label value=(java_objectc) from AndroidManifest.xml:4:9-37
	is also present at [com.github.adrielcafe:AndroidAudioConverter:0.0.8] AndroidManifest.xml:11:18-50 value=(@string/app_name).
	Suggestion: add 'tools:replace="android:label"' to  element at AndroidManifest.xml:3:4-40:19 to override.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : Attribute application@label value=(java_objectc) from AndroidManifest.xml:4:9-37
  	is also present at [com.github.adrielcafe:AndroidAudioConverter:0.0.8] AndroidManifest.xml:11:18-50 value=(@string/app_name).
  	Suggestion: add 'tools:replace="android:label"' to  element at AndroidManifest.xml:3:4-40:19 to override.

* 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 34s
Running Gradle task 'assembleDebug'...                             64.6s
Exception: Gradle task assembleDebug failed with exit code 1
处理 add ‘tools:replace=“android:label”’
nvim android/app/src/debug/AndroidManifest.xml

更改内容如下:

package="com.example.java_objectc"> 更改为
package="com.example.java_objectc" xmlns:tools="http://schemas.android.com/tools">
注意项目名称要对应

新增一行:

坑三 Error while merging dex archives:
D8: Cannot fit requested classes in a single dex file (# methods: 70322 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.

......

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
     The number of method references in a .dex file cannot exceed 64K.
     Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
处理 Error while merging dex archives:
nvim /Users/swot/learn/flutter/java_objectc/android/app/build.gradle

defaultConfig 里新增一行

multiDexEnabled true
objectc 坑一 CocoaPods could not find compatible versions for pod “flutter_sound”:
[!] CocoaPods could not find compatible versions for pod "flutter_sound":
      In Podfile:
        flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)

    Specs satisfying the `flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)` dependency were found, but they required a higher minimum deployment target.

......

Error output from CocoaPods:
↳

    [!] `` attempted to initialize an object with an unknown UUID. `CF3B75C9A7D2FA2A4C99F110` for attribute: `children`. This can be the result of a merge and the
    unknown UUID is being discarded.

    [!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See
    `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install
Error launching application on iPhone 8 Plus.
处理 CocoaPods could not find compatible versions for pod “flutter_sound”:

原因:在新创建的项目中未指定 ios 平台的版本,则默认为 9.0,但是 flutter_sound 插件需要的版本是 10 以上

创建项目时默认的 iso 平台版本

v ios/Podfile

# Uncomment this line to define a global platform for your project
# 配置被注释了
# platform :ios, '9.0'

flutter_sound 插件需要的 ios 平台版本是 10.0

v .symlinks/plugins/flutter_sound/ios/flutter_sound.podspec

#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'flutter_sound'
  s.version          = '8.4.2'
  s.summary          = 'Flutter plugin that relates to sound like audio and recorder.'
  s.description      = <<-DESC
Flutter plugin that relates to sound like audio and recorder.
                       DESC
  s.homepage         = 'https://github.com/dooboolab/flutter_sound/flutter_sound'
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Dooboolab' => 'dooboolab@gmail.com' }
  s.source           = { :path => '.' }
  s.source_files = 'Classes/**/*'
  s.public_header_files = 'Classes/**/*.h'
  s.dependency 'Flutter'

  s.ios.deployment_target = '10.0'  插件需要的 ios 版本
  s.static_framework = true
  s.dependency 'flutter_sound_core', '8.4.2'
  s.dependency 'mobile-ffmpeg-audio', '4.4.LTS'
  #s.dependency 'ffmpeg-kit-ios-full', '~> 4.4.LTS'
end

处理方法:将上面的 9.0 改成 10.0,并去掉注释。

坑二 you may set use_modular_headers! globally in your Podfile
    -> Installing webview_flutter_wkwebview (0.0.1)
      - Running pre install hooks
    [!] The following Swift pods cannot yet be integrated as static libraries:

    The Swift pod `DKPhotoGallery` depends upon `SDWebImage`, which does not define modules. To opt into those targets generating module maps (which is necessary to import them from Swift when building as
    static libraries), you may set `use_modular_headers!` globally in your Podfile, or specify `:modular_headers => true` for particular dependencies.
处理 you may set use_modular_headers! globally in your Podfile
nvim ios/Podfile

target 'Runner' do
  use_modular_headers!  新增内容
坑三 warning: The iOS Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target ‘TXIMSDK_Plus_iOS’ from project
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'TXIMSDK_Plus_iOS' from project
    'Pods')
处理 坑三 warning: The iOS Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target ‘TXIMSDK_Plus_iOS’ from project
nvim ios/Podfile

target 'Runner' do
  use_frameworks!  新增内容

还可以参考这个方法

https://www.jessesquires.com/blog/2020/07/20/xcode-12-drops-support-for-ios-8-fix-for-cocoapods/

The release notes for Xcode 12 beta state that the release “supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later.” I am not sure if that means support for building and deploying for iOS 8 is completely removed, but it sounds like it. Who is still deploying to iOS 8, anyway?

If you are using CocoaPods with Xcode 12 beta, then you have probably seen this error:

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99.

This is happening because support for iOS 8 has been dropped, but the minimum deployment target for the pod is iOS 8. This older GitHub issue on CocoaPods discusses this a bit, as well as this recently opened issue. Note that even if your minimum deployment target is greater than iOS 8, you will still see this error.

Until this is fixed in CocoaPods, you can add the following to your Podfile as a workaround:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end

This will remove all deployment target settings from all of the pods in your project, which allows them to simply inherit the project/workspace deployment target that you have specified at the top of your Podfile.

java_swift java 同 java_objectc swift 坑一 CocoaPods could not find compatible versions for pod “flutter_sound”:
[!] CocoaPods could not find compatible versions for pod "flutter_sound":
      In Podfile:
        flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)

    Specs satisfying the `flutter_sound (from `.symlinks/plugins/flutter_sound/ios`)` dependency were found, but they required a higher minimum deployment target.

......

Error output from CocoaPods:
↳

    [!] `` attempted to initialize an object with an unknown UUID. `CF3B75C9A7D2FA2A4C99F110` for attribute: `children`. This can be the result of a merge and the
    unknown UUID is being discarded.

    [!] Automatically assigning platform `iOS` with version `9.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See
    `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install
Error launching application on iPhone 8 Plus.
处理 CocoaPods could not find compatible versions for pod “flutter_sound”:

原因:在新创建的项目中未指定 ios 平台的版本,则默认为 9.0,但是 flutter_sound 插件需要的版本是 10 以上

创建项目时默认的 iso 平台版本

v ios/Podfile

# Uncomment this line to define a global platform for your project
# 配置被注释了
# platform :ios, '9.0'

flutter_sound 插件需要的 ios 平台版本是 10.0

v .symlinks/plugins/flutter_sound/ios/flutter_sound.podspec

#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html
#
Pod::Spec.new do |s|
s.name = 'flutter_sound'
  s.version          = '8.4.2'
  s.summary          = 'Flutter plugin that relates to sound like audio and recorder.'
  s.description      = <<-DESC
Flutter plugin that relates to sound like audio and recorder.
                       DESC
  s.homepage         = 'https://github.com/dooboolab/flutter_sound/flutter_sound'
  s.license          = { :file => '../LICENSE' }
  s.author           = { 'Dooboolab' => 'dooboolab@gmail.com' }
  s.source           = { :path => '.' }
  s.source_files = 'Classes/**/*'
  s.public_header_files = 'Classes/**/*.h'
  s.dependency 'Flutter'

  s.ios.deployment_target = '10.0'  插件需要的 ios 版本
  s.static_framework = true
  s.dependency 'flutter_sound_core', '8.4.2'
  s.dependency 'mobile-ffmpeg-audio', '4.4.LTS'
  #s.dependency 'ffmpeg-kit-ios-full', '~> 4.4.LTS'
end

处理方法:将上面的 9.0 改成 10.0,并去掉注释。

没有坑二 坑三 warning: The iOS Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target ‘TXIMSDK_Plus_iOS’ from project
warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target 'TXIMSDK_Plus_iOS' from project
    'Pods')
处理 坑三 warning: The iOS Simulator deployment target ‘IPHONEOS_DEPLOYMENT_TARGET’ is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.4.99. (in target ‘TXIMSDK_Plus_iOS’ from project
nvim ios/Podfile

target 'Runner' do
  use_frameworks!  新增内容

还可以参考这个方法

https://www.jessesquires.com/blog/2020/07/20/xcode-12-drops-support-for-ios-8-fix-for-cocoapods/

The release notes for Xcode 12 beta state that the release “supports on-device debugging for iOS 9 and later, tvOS 9 and later, and watchOS 2 and later.” I am not sure if that means support for building and deploying for iOS 8 is completely removed, but it sounds like it. Who is still deploying to iOS 8, anyway?

If you are using CocoaPods with Xcode 12 beta, then you have probably seen this error:

The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 14.0.99.

This is happening because support for iOS 8 has been dropped, but the minimum deployment target for the pod is iOS 8. This older GitHub issue on CocoaPods discusses this a bit, as well as this recently opened issue. Note that even if your minimum deployment target is greater than iOS 8, you will still see this error.

Until this is fixed in CocoaPods, you can add the following to your Podfile as a workaround:

post_install do |installer|
  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings.delete 'IPHONEOS_DEPLOYMENT_TARGET'
    end
  end
end

This will remove all deployment target settings from all of the pods in your project, which allows them to simply inherit the project/workspace deployment target that you have specified at the top of your Podfile.

kotlin_objectc kotlin 坑一 minSdkVersion 19
➜  java_objectc flutter run
Multiple devices found:
sdk gphone x86 (mobile) • emulator-5554                        • android-x86 • Android 11 (API 30) (emulator)
iPhone 8 Plus (mobile)  • C235F27E-F408-44E4-8223-43F4C4846E28 • ios         • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
[1]: sdk gphone x86 (emulator-5554)
[2]: iPhone 8 Plus (C235F27E-F408-44E4-8223-43F4C4846E28)
Please choose one (To quit, press "q/Q"): 1
Running "flutter pub get" in java_objectc...                           ⣟
 1,411ms
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on sdk gphone x86 in debug mode...
/Users/swot/learn/flutter/java_objectc/android/app/src/debug/AndroidManifest.xml Error:
	uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:flutter_plugin_record] /Users/swot/learn/flutter/java_objectc/build/flutter_plugin_record/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16
	Suggestion: use a compatible library with a minSdk of at most 16,
		or increase this project's minSdk version to at least 19,
		or use tools:overrideLibrary="record.wilson.flutter.com.flutter_plugin_record" to force usage (may lead to runtime failures)

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [:flutter_plugin_record] /Users/swot/learn/flutter/java_objectc/build/flutter_plugin_record/intermediates/library_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 16
  	Suggestion: use a compatible library with a minSdk of at most 16,
  		or increase this project's minSdk version to at least 19,
  		or use tools:overrideLibrary="record.wilson.flutter.com.flutter_plugin_record" to force usage (may lead to runtime failures)

* 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 37s
Running Gradle task 'assembleDebug'...                             67.5s

The plugin flutter_plugin_record requires a higher Android SDK version.
Fix this issue by adding the following to the file /Users/swot/learn/flutter/java_objectc/android/app/build.gradle:
android {
  defaultConfig {
    minSdkVersion 19
  }
}


Note that your app won't be available to users running Android SDKs below 19.
Alternatively, try to find a version of this plugin that supports these lower versions of the Android SDK.
Exception: Gradle task assembleDebug failed with exit code 1
处理 minSdkVersion 19
nvim /Users/swot/learn/flutter/java_objectc/android/app/build.gradle

change 16 to 19

minSdkVersion 16
minSdkVersion 19
坑二 add ‘tools:replace=“android:label”’
➜  java_objectc flutter run
Multiple devices found:
sdk gphone x86 (mobile) • emulator-5554                        • android-x86 • Android 11 (API 30) (emulator)
iPhone 8 Plus (mobile)  • C235F27E-F408-44E4-8223-43F4C4846E28 • ios         • com.apple.CoreSimulator.SimRuntime.iOS-14-4 (simulator)
[1]: sdk gphone x86 (emulator-5554)
[2]: iPhone 8 Plus (C235F27E-F408-44E4-8223-43F4C4846E28)
Please choose one (To quit, press "q/Q"): 1
Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enabling software rendering with "--enable-software-rendering".
Launching lib/main.dart on sdk gphone x86 in debug mode...
/Users/swot/learn/flutter/java_objectc/android/app/src/debug/AndroidManifest.xml:4:9-37 Error:
	Attribute application@label value=(java_objectc) from AndroidManifest.xml:4:9-37
	is also present at [com.github.adrielcafe:AndroidAudioConverter:0.0.8] AndroidManifest.xml:11:18-50 value=(@string/app_name).
	Suggestion: add 'tools:replace="android:label"' to  element at AndroidManifest.xml:3:4-40:19 to override.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
> Manifest merger failed : Attribute application@label value=(java_objectc) from AndroidManifest.xml:4:9-37
  	is also present at [com.github.adrielcafe:AndroidAudioConverter:0.0.8] AndroidManifest.xml:11:18-50 value=(@string/app_name).
  	Suggestion: add 'tools:replace="android:label"' to  element at AndroidManifest.xml:3:4-40:19 to override.

* 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 34s
Running Gradle task 'assembleDebug'...                             64.6s
Exception: Gradle task assembleDebug failed with exit code 1
处理 add ‘tools:replace=“android:label”’
nvim android/app/src/debug/AndroidManifest.xml

更改内容如下:

package="com.example.java_objectc"> 更改为
package="com.example.java_objectc" xmlns:tools="http://schemas.android.com/tools">
注意项目名称要对应

新增一行:

坑三 Error while merging dex archives:
D8: Cannot fit requested classes in a single dex file (# methods: 70322 > 65536)
com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
The number of method references in a .dex file cannot exceed 64K.

......

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > com.android.builder.dexing.DexArchiveMergerException: Error while merging dex archives:
     The number of method references in a .dex file cannot exceed 64K.
     Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
处理 Error while merging dex archives:
nvim /Users/swot/learn/flutter/java_objectc/android/app/build.gradle

defaultConfig 里新增一行

multiDexEnabled true
坑四 The binary version of its metadata is 1.5.1, expected version is 1.1.15
e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/swot/.gradle/caches/transforms-2/files-2.1/24fa3aa8d2270e5eb067bbe36e9b7563/jetified-kotlin-stdlib-1.5.10.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
处理 kotlin 版本问题

查看 Android Studio 中 Kotlin 版本

上图举例中的版本为 1.5.31

查看项目指定 cotlin 版本

  vim android/build.gradle
 
  buildscript {
      ext.kotlin_version = '1.3.50'  更改为
      ext.kotlin_version = '1.5.31'

尝试在 Android Studio 中开关 Kotlin 插件

执行 flutter clean

再执行 flutter run 试试

坑五 Gradle threw an error while downloading artifacts from the network
Gradle threw an error while downloading artifacts from the network. Retrying to download...
Exception: Gradle task assembleDebug failed with exit code 1

执行 flutter run -v 时发现是在下载下面 zip 包时报错

[ +239 ms] Downloading https://services.gradle.org/distributions/gradle-6.7-all.zip
处理 Gradle 版本低的问题

https://stackoverflow.com/questions/61986128/gradle-threw-an-error-while-downloading-artifacts-from-the-network-exception

Do follow some steps:

Go to flutter_app => android => gradle => wrapper directoryDelete gradle-wrapper.jar fileOpen and edit gradle-wrapper.properties fileChange distributionUrl=https://services.gradle.org/distributions/gradle-x.x.x-all.zip to gradle-7.2-all.zip or latestOn terminal use flutter run command

在我的测试项目中举例如下:

distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip  更改为

distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
坑六 Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

Starting a Gradle Daemon, 1 stopped Daemon could not be reused, use --status for details

处理:

cd /Users/swot/.gradle/daemon
删除里面的版本目录,如 7.2

或者重启电脑,Gradle Daemon 就没有了。

坑七 Starting a Gradle Daemon (subsequent builds will be faster)

等着吧……,大约半小时左右。看网速,看机器配置。

kotlin_swift 上面的三个都解决了,这个就不用解决了

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/993153.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-21
下一篇 2022-05-21

发表评论

登录后才能评论

评论列表(0条)

保存