Run errors - Plugins depricated versions and pod - android

The plugins flutter_webview_plugin, geocoder, location, sms use a deprecated version of the Android embedding.
To avoid unexpected runtime failures, or future build failures, try to see if these plugins support the Android V2 embedding. Otherwise, consider removing them since a future release of Flutter will remove these deprecated APIs.
If you are plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.
Launching lib/main.dart on iPhone 13 in debug mode...
Running pod install...
CocoaPods' output:
↳
Preparing
Analyzing dependencies
Inspecting targets to integrate
Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)
Fetching external sources
-> Fetching podspec for `Flutter` from `Flutter`
-> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
cloud_firestore: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
firebase_auth: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
-> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
firebase_core: Using Firebase SDK version '8.11.0' defined in 'firebase_core'
-> Fetching podspec for `flutter_webview_plugin` from `.symlinks/plugins/flutter_webview_plugin/ios`
-> Fetching podspec for `geocoder` from `.symlinks/plugins/geocoder/ios`
-> Fetching podspec for `google_sign_in` from `.symlinks/plugins/google_sign_in/ios`
-> Fetching podspec for `location` from `.symlinks/plugins/location/ios`
-> Fetching podspec for `sms` from `.symlinks/plugins/sms/ios`
-> Fetching podspec for `url_launcher_ios` from `.symlinks/plugins/url_launcher_ios/ios`
Resolving dependencies of `Podfile`
CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
[!] CocoaPods could not find compatible versions for pod "cloud_firestore":
In Podfile:
cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
Specs satisfying the `cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)` dependency were found, but they required a higher minimum deployment target.
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in `resolve'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.1.0/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
Error output from CocoaPods:
↳
[!] `<PBXGroup UUID=`97C146E51CF9000F007C117D`>` 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 13.

You must add this script to your "Podfile" in ios folder:
target.build_configurations.each do |config|
config.build_settings['IPHONEOS_DEPLOYMENT_TARGET'] = '13.0'
end
such as the below pic:
after that, you must run pod install or run again to be pod again installed.

Related

CocoaPods could not find compatible versions for pod "RCT-Folly"

when i do pod install this happends:
[!] CocoaPods could not find compatible versions for pod "RCT-Folly": In snapshot (Podfile.lock):
RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
In Podfile:
RCT-Folly (from `../node_modules/react-native/third-party-podspecs/RCT-Folly.podspec`)
It seems like you've changed the version of the dependency `RCT-Folly` and it differs from the version stored in `Pods/Local Podspecs`. You should run `pod update RCT-Folly --no-repo-update` to apply changes made locally.
[!] use_flipper is deprecated, use the flipper_configuration option in the use_react_native function
[!] There are duplicate dependencies on `OpenSSL-Universal` in `Podfile`:
- OpenSSL-Universal (= 1.1.1100)
- OpenSSL-Universal (= 1.1.180)
I was trying to upgrade the RCT-Folly with 'pod update RCT-Folly
--no-repo-update' this happend:
-------------
[!] CocoaPods could not find compatible versions for pod "React-jsc": In Podfile:
React-jsc (from `../node_modules/react-native/ReactCommon/jsc`)
Specs satisfying the `React-jsc (from `../node_modules/react-native/ReactCommon/jsc`)` dependency were found, but they required a higher minimum deployment target.
[!] use_flipper is deprecated, use the flipper_configuration option in the use_react_native function
[!] There are duplicate dependencies on `OpenSSL-Universal` in `Podfile`:
- OpenSSL-Universal (= 1.1.1100)
- OpenSSL-Universal (= 1.1.180)
-------------
i was trying to locate the file with the React-jsc but in can't find nothing. I don't even know what it is.
Also in my Podfile i try to fix the error of Flipper-Folly and the OpenSSL-Universal adding this lines but not works:
use_flipper!({ 'Flipper-Folly' => '2.6.0' })
pod 'OpenSSL-Universal', '1.1.180'

Nativescript Android build error: Could not find com.android.tools.build:gradle:7.3

I created a new NativeScript JavaScript project, using an existing project as a template. The new project builds OK on iOS, but fails on Android with the error:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'nativescript_google_maps'.
> Could not resolve all files for configuration ':classpath'.
> Could not find com.android.tools.build:gradle:7.3..
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/7.3./gradle-7.3..pom
- https://jcenter.bintray.com/com/android/tools/build/gradle/7.3./gradle-7.3..pom
Required by:
project :
This error does NOT occur on the existing project. I hard-coded the versions of the various plugins that aren't at the latest level, to ensure that all the plugins are the same between the two projects. Here's the package.json file:
{
"name": "rrr",
"main": "app/app.js",
"version": "1.0.0",
"private": true,
"dependencies": {
"#bradmartin/nativescript-urlhandler": "^2.0.1",
"#kefah/nativescript-google-maps": "1.0.7",
"#master.technology/permissions": "^2.0.1",
"#nativescript-community/ui-material-bottom-navigation": "7.0.2",
"#nativescript/appversion": "^2.0.0",
"#nativescript/contacts": "2.0.4",
"#nativescript/core": "8.3.5",
"#nativescript/email": "^2.0.5",
"#nativescript/firebase": "^11.1.3",
"#nativescript/geolocation": "8.0.2",
"#nativescript/iqkeyboardmanager": "2.0.0",
"#nativescript/theme": "^3.0.2",
"#triniwiz/nativescript-toasty": "^4.1.3",
"base-64": "^1.0.0",
"nativescript-bitmap-factory": "^1.8.1",
"nativescript-clipboard": "^2.1.1",
"nativescript-danem-google-maps-utils": "^1.0.18",
"nativescript-drop-down": "6.0.1",
"nativescript-pdf-view": "^3.0.0-1",
"nativescript-phone": "^3.0.3",
"nativescript-screenshot": "^0.0.2",
"nativescript-sqlite": "^2.8.6",
"nativescript-ui-listview": "10.0.2",
"nativescript-ui-sidedrawer": "10.0.2",
"patch-package": "^6.5.1"
},
"devDependencies": {
"#nativescript/android": "8.1.1",
"#nativescript/ios": "8.2.3",
"#nativescript/webpack": "5.0.6"
},
"scripts": {
"postinstall": "patch-package"
}
}
When I run tns build android --log trace on the new project I see this info:
Got gradle versions null from runtime v8.1.1
Exec npm view #nativescript/android dist-tags --json
stdout: {
"rc": "8.2.0-rc.0",
"latest": "8.4.0",
"alpha": "8.4.0-alpha.8",
"dev": "8.4.0-dev.2",
"beta": "8.5.0-beta.0"
}
stderr:
Exec npm view #nativescript/android#8.4.0 gradle --json
stdout: {
"version": "7.5",
"android": "7.3."
}
stderr:
Got gradle versions {"gradleVersion":"7.5","gradleAndroidPluginVersion":"7.3."} from the latest runtime v8.4.0
These entries do not appear in the build log for the existing project; it looks like a higher version of cradle is being used on the new project.
I've seen others report similar error messages, but I've not seen working resolutions. For example, I did add the line to buildscript.gradle, but it has no effect:
dependencies {
classpath "com.google.gms:google-services:4.3.4"
classpath "com.android.tools.build:gradle:7.3" // <- added this line
}
I've done repeated tns clean's, updated the Android Studio build tools, etc., but still no luck. I welcome any insight.
Edit 1/22/2022:
Here's the tns doctor output:
✔ Getting environment information
No issues were detected.
✔ Your ANDROID_HOME environment variable is set and points to correct directory.
✔ Your adb from the Android SDK is correctly installed.
✔ The Android SDK is installed.
✔ A compatible Android SDK for compilation is found.
✔ Javac is installed and is configured properly.
✔ The Java Development Kit (JDK) is installed and is configured properly.
✔ Xcode is installed and is configured properly.
✔ xcodeproj is installed and is configured properly.
✔ CocoaPods are installed.
✔ CocoaPods update is not required.
✔ CocoaPods are configured properly.
✔ Your current CocoaPods version is newer than 1.0.0.
✔ Python installed and configured correctly.
✔ The Python 'six' package is found.
✔ Xcode version 13.3.1 satisfies minimum required version 10.
✔ Getting NativeScript components versions information...
⚠ Update available for component nativescript. Your current version is 8.1.5 and the latest available version is 8.4.0.
⚠ Update available for component #nativescript/core. Your current version is 8.3.5 and the latest available version is 8.4.6.
⚠ Update available for component #nativescript/ios. Your current version is 8.2.3 and the latest available version is 8.4.1.
⚠ Update available for component #nativescript/android. Your current version is 8.1.1 and the latest available version is 8.4.0.
Is there a way to control which version of gradle is used?
Upon advice from the NativeSript Android Discord channel, I updated the NativeScript CLI, core, and platforms to the latest versions and can build successfully. This doesn't answer why the existing project would build and the new one wouldn't, but does bypass the problem.

Cannot read property 'replace' of undefined when deploying to Play Store using GitHub Actions

I'm trying to deploy a recent build to Play Store internal testing using GitHub Actions.
The latest version is 3 (1.0.3)
The versionCode and versionName are defined in yml file as follows:
- name: Bump Android version
uses: chkfung/android-version-actions#v1.1
with:
gradlePath: app/build.gradle
versionCode: ${{ github.run_number }}
versionName: 1.0.4
Error:
Run chkfung/android-version-actions#v1.1
with:
gradlePath: app/build.gradle
versionCode: 6
versionName: 1.0.4
env:
JAVA_HOME_11.0.11_x64: /opt/hostedtoolcache/jdk/11.0.11/x64
JAVA_HOME: /opt/hostedtoolcache/jdk/11.0.11/x64
JAVA_HOME_11_0_11_X64: /opt/hostedtoolcache/jdk/11.0.11/x64
Gradle Path : app/build.gradle
Version Code : 6
Version Name : 1.0.4
/home/runner/work/_actions/chkfung/android-version-actions/v1.1/index.js:21
newGradle = newGradle.replace(versionCodeRegexPattern, `$1$***versionCode***`);
^
TypeError: Cannot read property 'replace' of undefined
at ReadFileContext.callback (/home/runner/work/_actions/chkfung/android-version-actions /v1.1/index.js:21:35)
at FSReqCallback.readFileAfterOpen [as oncomplete] (fs.js:239:13)
I fixed this by adding an extension for the gradle kotlin file, so it should be gradlePath: app/build.gradle.kts

How to resolve #bazel_tools//tools/android:databinding_exec when switching from bazel 3.6.0 to 3.7.0

I’ve been using bazel to build an android project, initially starting with a 0.24 version, then using the 2.0 version for a longer time, and now I am trying to switch to the latest 3.7.0 / 3.7.1 versions.
Currently I am using the following important .bazelrc settings for android:
build:androidbuild --crosstool_top=#androidndk//:default_crosstool
build:androidbuild --host_crosstool_top=#bazel_tools//tools/cpp:toolchain
build:android-32 --config=androidbuild --cpu=x86 --fat_apk_cpu=x86
All cc_binary / cc_library targets can still be built the same way we used to, but the android_binary targets no longer builds and I am getting this error:
ERROR: While resolving toolchains for target
#bazel_tools//tools/android:databinding_exec: No matching toolchains
found for types #bazel_tools//tools/cpp:toolchain_type. Maybe
--incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See
https://github.com/bazelbuild/bazel/issues/10134 for details and
migration instructions.
I tried to find which was the bazel version that started to throw this error, and I found that I can still build my project with 3.6.0, but I start getting the above error if I switch to 3.7.0 or 3.7.1.
Looking at the 3.6.0 vs 3.7.0 changes, I am wondering if the new create_dummy_sdk_toolchain call in tools/android/android_sdk_repository_template.bzl would cause this failure or there is something else I am missing (like changes in the cc_flags_supplier.bzl / compiler_flag.bzl sources to set incompatible_use_toolchain_transition to True).
I tried the approach of using --platforms instead, but I am still getting errors even in that case:
build:androidbuild --extra_toolchains=#androidndk//:all
build:android-32 --config=androidbuild --cpu=x86 --platforms=//config:android_x86
With:
platform(
name = "android_x86",
constraint_values = [
"#bazel_tools//platforms:x86_32",
"#bazel_tools//platforms:android",
],
cpu_constraints = [
],
os_constraints = [
],
target_platform = True,
)
Error:
ERROR: While resolving toolchains for target
#bazel_tools//tools/android:instrumentation_test_check: No matching
toolchains found for types #bazel_tools//tools/cpp:toolchain_type.
Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped
and there is no default C++ toolchain added in the WORKSPACE file? See
https://github.com/bazelbuild/bazel/issues/10134 for details and
migration instructions.
Can you please advise me on what is missing from the project that is required to solve the problem caused by the 3.6.0 vs 3.7.0 diffs, do we now need to define a proper toolchain for Android (can't we rely anymore on bazel to figure out how to build android targets)?
UPDATE Dec/16/2020
Looks like the problem was caused by this code:
WORKSPACE:
register_execution_platforms(
"//tools/config:host_platform",
)
In the BUILD file:
platform(
name = "host_platform",
constraint_values = [
],
cpu_constraints = [
"#bazel_tools//platforms:x86_32",
"#bazel_tools//platforms:x86_64",
],
host_platform = True,
os_constraints = [
"#bazel_tools//platforms:windows",
],
)
For some reason this works in bazel 3.6.0 even when the host is Linux, but it's no longer working in 3.7.0.
The problem was caused by this code:
WORKSPACE:
register_execution_platforms(
"//tools/config:host_platform",
)
In the BUILD file:
platform(
name = "host_platform",
constraint_values = [
],
cpu_constraints = [
"#bazel_tools//platforms:x86_32",
"#bazel_tools//platforms:x86_64",
],
host_platform = True,
os_constraints = [
"#bazel_tools//platforms:windows",
],
)
For some reason this works in bazel 3.6.0 even when the host is Linux, but it's no longer working in 3.7.0.
when I do bazel build --platforms=//:linux_arm64 it gave me the same error:
hile resolving toolchains for target #io_bazel_rules_go//:cgo_context_data: No matching toolchains found for types #bazel_tools//tools/cpp:toolchain_type. Maybe --incompatible_use_cc_configure_from_rules_cc has been flipped and there is no default C++ toolchain added in the WORKSPACE file? See https://github.com/bazelbuild/bazel/issues/10134 for details and migration instructions.
The follow command works
bazel build --platforms=#io_bazel_rules_go//go/toolchain:linux_arm64

Ionic platform add android throws Syntax error for package.json

I'm building an app with ionic. I've added ios to the platforms with no problem, but when I type ionic platform add android I get the following error:
Updated the hooks directory to have execute permissions Adding android project...
Creating Cordova project for the Android platform: Path:
platforms/android Package: com.ionicframework.conrem979285 Name:
ConRem Activity: MainActivity Android target: android-23 Android
project created with cordova-android#5.1.0 Running command:
"/Users/Roozbeh/Desktop/ConRem
backup/hooks/after_prepare/010_add_platform_class.js"
"/Users/Roozbeh/Desktop/ConRem backup" add to body class:
platform-android Installing "cordova-plugin-app-event" for android
Installing "cordova-plugin-datepicker" for android Installing
"cordova-plugin-device" for android Installing
"de.appplant.cordova.plugin.local-notification" for android Dependent
plugin "cordova-plugin-device" already installed on android. Dependent
plugin "cordova-plugin-app-event" already installed on android.
Your support is needed. If you use the local-notification plugin please support us in order to ensure further development. https://github.com/katzer/cordova-plugin-local-notifications#supporting
Thank you!
Saving platform to package.json file There was an error opening your
package.json file. SyntaxError: /Users/Roozbeh/Desktop/ConRem
backup/package.json: Unexpected token ] at Object.parse (native) at
Object.Module._extensions..json (module.js:450:27) at Module.load
(module.js:356:32) at Function.Module._load (module.js:311:12) at
Module.require (module.js:366:17) at require (module.js:385:17) at
Object.readInPackageJson
(/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/state.js:14:10)
at Object.getPackageJson
(/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/state.js:23:25)
at Object.savePlatform
(/usr/local/lib/node_modules/ionic/node_modules/ionic-app-lib/lib/state.js:368:27)
at /usr/local/lib/node_modules/ionic/lib/ionic/cordova.js:83:22
/Users/Roozbeh/Desktop/ConRem backup/package.json: Unexpected token ]
(CLI v1.7.14)
Here is my package.json file:
{
"name": "conrem",
"version": "1.1.1",
"description": "ConRem: An Ionic project",
"dependencies": {
"gulp": "^3.5.6",
"gulp-sass": "^2.0.4",
"gulp-concat": "^2.2.0",
"gulp-minify-css": "^0.3.0",
"gulp-rename": "^1.2.0"
},
"devDependencies": {
"bower": "^1.3.3",
"gulp-util": "^2.2.14",
"shelljs": "^0.3.0"
},
"cordovaPlugins": [
"cordova-plugin-device",
"cordova-plugin-console",
"cordova-plugin-whitelist",
"cordova-plugin-splashscreen",
"cordova-plugin-statusbar",
"ionic-plugin-keyboard",
"cordova-plugin-datepicker",
],
"cordovaPlatforms": []
}
Your system information:
Cordova CLI: 6.0.0 Gulp version: CLI version 3.9.0 Gulp local:
Ionic Version: 1.2.4 Ionic CLI Version: 1.7.14 Ionic App Lib Version:
0.7.0 ios-deploy version: 1.8.4 ios-sim version: 5.0.4 OS: Mac OS X El Capitan Node Version: v4.2.3 Xcode version: Xcode 7.2.1 Build
version 7C1002
Can someone please tell me what this syntax error is?
Thanks
in your package.json there is one extra comma. I think that parsing is very strict and had the same issue before. There must not be a comma after the last item in an array.On the line
"cordova-plugin-datepicker",
remove the comma at the end.
One of you packages are not supported by Cordova 6. Please check out each of them that they are supported in the targeted CLI version 6.0.0.

Categories

Resources