How to switch flutter project on Android studio 2021.2.1 from my windows machine to android studio ladybug on my mac through Git
- c - Solaris 10 make Error code 1 Fatal Error when trying to build python 2.7.16 - Stack Overflow 推荐度:
- javascript - How to dismiss a phonegap notification programmatically - Stack Overflow 推荐度:
- javascript - Get the JSON objects that are not present in another array - Stack Overflow 推荐度:
- javascript - VS 2015 Angular 2 import modules cannot be resolved - Stack Overflow 推荐度:
- javascript - Type 'undefined' is not assignable to type 'menuItemProps[]' - Stack Overflow 推荐度:
- 相关推荐
I am making an app I plan to release on iPhone and Android in this coming year. I have been trying to switch the code onto my new Mac and on Android Studio Ladybug, but no matter what I do, I cannot get the project to run without throwing errors on my m1 Mac. I would like it to be on my Mac so I can 'code on the go'. I have tried using Chatgpt to help fix errors, but it brings me in circles and never helps me fix anything.
The current issue I am facing is when I run 'flutter pub get' .... (OS Error: File name too long, errno = 63) Failed to update packages. but I can go through my ~ .zshrc file and there are no duplicates. Does anyone have any pointers! Thanks!
But when actually running the flutter application I get
FAILURE: Build failed with an exception.
- What went wrong: Could not open cp_settings generic class cache for settings file '/Users/lucaskelbe/StudioProjects/MyFitPlan/android/settings.gradle' (/Users/lucaskelbe/.gradle/caches/7.5/scripts/cauwumxt3vajlc7mm71a6u491).
BUG! exception in phase 'semantic analysis' in source unit 'BuildScript' Unsupported class file major version 65
- 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
BUILD FAILED in 3s
I have tried making sure my gradle and java were compatible versions, as well as spending 8 hours total trying to fix the issues, but to no avail.
my ~ .zshrc file looks like this:
export JAVA_HOME=$(/usr/libexec/java_home -v 23)
export PATH=$JAVA_HOME/bin:$PATH
# Remove repeated entries
export PATH="$HOME/development/flutter/bin:$ANDROID_HOME/cmdline-tools/latest/bin:$ANDROID_HOME/platform-tools:$PATH"
export FLUTTER_ROOT="$HOME/development/flutter"
export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="/opt/homebrew/opt/ruby/bin:$PATH"
export GEM_HOME=$HOME/.gem
export PATH="$GEM_HOME/bin:$PATH"
setopt hist_ignore_all_dups
My android/build.gradle looks like this:
buildscript {
repositories {
google()
mavenCentral()
}
dependencies {
// Android Gradle Plugin - Update to a compatible version
classpath 'com.android.tools.build:gradle:8.1.2'
// Google Services Plugin - Adjust to latest stable version
classpath 'com.google.gms:google-services:4.3.15'
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
// Set root project build directory
rootProject.buildDir = '../build'
// Configure subproject build directories
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.evaluationDependsOn(':app')
}
// Clean task
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
And my android/settings.gradle looks like this:
pluginManagement {
def flutterSdkPath = {
def properties = new Properties()
file("local.properties").withInputStream { properties.load(it) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
return flutterSdkPath
}()
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "8.10" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id 'com.google.gms.google-services' version '4.3.0' apply false
}
include ':app'
- 与微信支付宝较量有难度 解析Apple Pay入华细节
- 谷歌重大突破:量子计算机或真可行
- amazon ec2 - Flask Babel inconsistent language switching in production - Stack Overflow
- php - Laravel RouteServiceProvider missing in appProviders directory - Stack Overflow
- ios - AccessorySetupKit picker doesn't show accessory unless previously paired in Setting app first - Stack Overflow
- java - I have an issue with tmcbeans, I can not run projects - Stack Overflow
- reactjs - how to fetch headers in middleware in Next js - Stack Overflow
- android - How to setImageCaptureResolutionSelector() in CameraController? - Stack Overflow
- linker - Appending to an ELF file - Cortex MGCC - Stack Overflow
- gdb - How to properly load and pass a file path to open syscall in x86_64 assembly? - Stack Overflow
- sql - Merge tables with different timestamps? - Stack Overflow
- python - Pyinstaller (Mac App) - Why only permission given to the executable file (instead of .app bundle) could work? - Stack O
- regex - Change text block with nearest search pattern - Stack Overflow
- Meta Graph API Post engagement - Stack Overflow
- r - Why does adding markers in a Shiny app work for one map but not the other? - Stack Overflow
- c# - Unity build error for Android when use CMake with Ninja on Mac - Stack Overflow
- python - mecab-python3 AWS lambda "circular import" error - Stack Overflow