I created a project to demo Kotlin Multiplatform Mobile. I built and ran it successfully on both devices: Android and iOS. After that, I re-ran the project on iOS. It had an error.
> Configure project :shared
Kotlin Multiplatform Projects are an Alpha feature. See: https://kotlinlang.org/docs/reference/evolution/components-stability.html. To hide this message, add 'kotlin.mpp.stability.nowarn=true' to the Gradle properties.
FAILURE: Build failed with an exception.
* What went wrong:
Task 'embedAndSignAppleFrameworkForXcode' not found in project ':shared'.
* Try:
Run gradlew tasks to get a list of available tasks. 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 1s
Command PhaseScriptExecution failed with a nonzero exit code
** BUILD FAILED **
The following build commands failed:
PhaseScriptExecution Run\ Script /Volumes/Data/ProjectsKMM/DemoNetworkAPI/build/ios/iosApp.build/Debug-iphonesimulator/iosApp.build/Script-7555FFB5242A651A00829871.sh
(1 failure)
This is my project on Github Click here. Please see it and help me to find the error.
Thanks in advance.
You need to use at least Kotlin 1.5.20 for embedAndSignAppleFrameworkForXcode to be available (more info in https://blog.jetbrains.com/kotlin/2021/07/multiplatform-gradle-plugin-improved-for-connecting-kmm-modules/)
embedAndSignPodAppleFrameworkForXcode worked for me
Kotlin plugin version: 212-1.7.10-release-333-AS5457.46
This was the suggestion from xcode/Android Studio regarding failed task
Task 'embedAndSignAppleFrameworkForXcode' not found in project ':shared'. Some candidates are: 'embedAndSignPodAppleFrameworkForXcode'.
Related
When I open powershell I typed ./gradlew setupDecompWorkspace it gives me that
* What went wrong:
Task 'setupDecompWorkspace' not found in root project 'forge-1.12.2-14.23.5.2859-mdk'.
* Try:
Run gradlew tasks to get a list of available tasks. 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 8s
PS C:\Users\Ostrov\Desktop\Minecraft Mod Creation\forge-1.12.2-14.23.5.2859-mdk>```
It says BUILD FAILED in 8s because I tried to install it and it installed it for a few minutes but then it says there is an error and build failed
Are you using the mdk from Forge's website?
If you're on IntelliJ, you don't have to run this command. It automatically sets up the Gradle project. You should get a UI that looks like this:
Now, instead of typing the command, you can just click genIntellijRuns under the fg_runs section of the Gradle menu.
I added "image_picker: ^0.8.4+11" package to my project.
After adding it was returning this error.
What went wrong:
A problem occurred configuring project ':flutter_plugin_android_lifecycle'.
Could not resolve all artifacts for configuration ':flutter_plugin_android_lifecycle:classpath'.
Could not find gradle-3.5.0.jar (com.android.tools.build:gradle:3.5.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.5.0/gradle-3.5.0.jar
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 3s
Exception: Gradle task assembleDebug failed with exit code 1
I have similar problem , on windows and Gradle:3.5.0 .
any package using this Gradle Version has Error .
I Solved problem by clean cache of Gradle in this address:
C:\Users\<MY_ACCOUNT>\.gradle\caches
and then , resync project an android module.
I updated the gradle to latest version and the problem was solved.
Go to android\gradle\gradle-wrapper.properties and change the gradle version to the last one.
i just created a new react-native app using npx create-react-native-app myapp which was successfully created. but when i try to build it using gradlew assembleRelease, i get this error
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Failed to find Platform SDK with path: platforms;android-30
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 43s
it appears like teres a gradle problem. how do i fix it?
I tried to rename my app because I need it but I got the problem after rename it (it works fine before I rename it). I followed this instruction : https://dev.to/abdulbasit313/proper-way-to-rename-a-react-native-project-in-2019-3b98 but when I run, build failed
I'm using react native 0.59.9
This is the error :
info Starting JS server...
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Task :app:preDebugBuild FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.github.yalantis:ucrop:2.2.2-native.
Searched in the following locations:
- file:/C:/Users/ASUS/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/C:/Users/ASUS/.m2/repository/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- https://dl.google.com/dl/android/maven2/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- https://jcenter.bintray.com/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
- file:/D:/3-SIMASA/simasamobile/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.pom
- file:/D:/3-SIMASA/simasamobile/node_modules/react-native/android/com/github/yalantis/ucrop/2.2.2-native/ucrop-2.2.2-native.jar
Required by:
project :app > project :react-native-image-crop-picker
* 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
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.4.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 7s
21 actionable tasks: 20 executed, 1 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag for more details.
The mentioned solution is not correct because it'll clear your linked libraries... You can easily rename the android project by changing name in android/src/main/res/values/strings.xml. Also on iOS, you can change the name by opening ios/your_project.xcodeproj in Xcode and modify Display Name in the General tab of your project settings.
Please install and relink the library again. This will resolve the issue.
react-native-image-crop-picker
Also please refer here to how to rename project in easier way.
I'm working on a route map app with Flutter using google_maps_webservice,location,map_view package after run
Launching lib\main.dart on SAMSUNG SM G530AZ in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:preDebugBuild'.
Android dependency 'com.google.android.gms:play-services-base' has different version for the compile (15.0.1) and runtime (16.0.1) classpath. You should manually set the same version via DependencyResolution
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 11s
Finished with error: Gradle task assembleDebug failed with exit code 1
Finaly after sevral day i've found, the package map_view have many dependencies conflict between the migration androidX and android.support: so instead of continue using mapview I'm using cirrus_map_view the correction version of map_view and it work!