How to fix gradlew exception - gradlew

I am new to java and trying to run gradlew for the first time.
I am seeing below error.
Please advise how to fix it.
% ../gradlew
FAILURE: Build failed with an exception.
* Where:
Settings file '/Users/kalpesh/work/iraga/message-api/settings.gradle'
* What went wrong:
Could not compile settings file '/Users/kalpesh/work/iraga/message-api/settings.gradle'.
> startup failed:
General error during semantic analysis: Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61

Related

error to assembleRelease my react native app after change windows

Task :app:checkReleaseAarMetadata FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:checkReleaseAarMetadata'.
Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
Failed to transform appcompat-1.2.0.aar (androidx.appcompat:appcompat:1.2.0) to match attributes {artifactType=android-aar-metadata, org.gradle.status=release}.
> Could not find appcompat-1.2.0.aar (androidx.appcompat:appcompat:1.2.0).
Searched in the following locations:
https://dl.google.com/dl/android/maven2/androidx/appcompat/appcompat/1.2.0/appcompat-1.2.0.aar

react-native Cannot find cannot find symbol Freshchat after upgrading react-native-freshchat-sdk

I upgraded freshchat from "react-native-freshchat-sdk": "^2.6.4" to "react-native-freshchat-sdk": "^4.0.3" and tried running the android app but the build failed with error
Compatible side by side NDK version was not found for android.ndkVersion '22.1.7171670'
> Task :app:compileDebugJavaWithJavac
> Task :app:compileDebugJavaWithJavac FAILED
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.2/userguide/command_line_interface.html#sec:command_line_warnings
500 actionable tasks: 6 executed, 494 up-to-date
/Users/angellanaigaga/Desktop/numida/trackapp/frontend/trackapp-native/android/app/src/main/java/com/numidatech/numida/NumidaMessagingService.java:3: error: cannot find symbol
import com.freshchat.consumer.sdk.Freshchat;
^
symbol: class Freshchat
location: package com.freshchat.consumer.sdk
/Users/angellanaigaga/Desktop/numida/trackapp/frontend/trackapp-native/android/app/src/main/java/com/numidatech/numida/NumidaMessagingService.java:11: error: cannot find symbol
if (Freshchat.isFreshchatNotification(message)) {
^
symbol: variable Freshchat
location: class NumidaMessagingService
/Users/angellanaigaga/Desktop/numida/trackapp/frontend/trackapp-native/android/app/src/main/java/com/numidatech/numida/NumidaMessagingService.java:12: error: cannot find symbol
Freshchat.handleFcmMessage(this.getApplicationContext(), message);
^
symbol: variable Freshchat
location: class NumidaMessagingService
Note: /Users/angellanaigaga/Desktop/numida/trackapp/frontend/trackapp-native/android/app/src/debug/java/com/numidatech/numida/ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
3 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 30s
After digging into the Freshworks and
roid Github, I had to update my App Module gradle file (app/build.gradle) to include freshdesk:freshchat in dependencies like this
dependencies {
implementation 'com.github.freshdesk:freshchat-android:{latestVersion}'
}
...
implementation (project(':react-native-freshchat-sdk')){
exclude group: 'com.github.freshworks'
}
implementation 'com.github.freshdesk:freshchat-android:5.3.3'

./gradle bundlerelease not generating aab

I was trying to build an app via ./gradle bundlerelease
got an error everytime:
C:\Users\xxx\Desktop\app\node_modules\#react-native-firebase\app\android\src\reactnative\java\io\invertase\firebase\app\ReactNativeFirebaseAppInitProvider.java:25: error: cannot find symbol
BuildConfig.APPLICATION_ID + ".reactnativefirebaseappinitprovider";
^
symbol: variable APPLICATION_ID
location: class BuildConfig
1 error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-firebase_app:compileReleaseJavaWithJavac'.
Compilation failed; see the compiler error output for details.
Downgrad the gradle to 3.6.0 (in build.gradle) and rebuild the project.
classpath('com.android.tools.build:gradle:3.6.0')

Why when I want to run an Android yarn error like this?

Why when I want to run an Android yarn error like this?
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
> Task :app:processDebugResources FAILED
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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
10 actionable tasks: 2 executed, 8 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> Android resource linking failed
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:6:5-25:19: AAPT: error: resource m
ipmap/ic_launcher (aka com.konspirasisnack:mipmap/ic_launcher) not found.
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:6:5-25:19: AAPT: error: resource s
tring/app_name (aka com.konspirasisnack:string/app_name) not found.
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:6:5-25:19: AAPT: error: resource m
ipmap/ic_launcher_round (aka com.konspirasisnack:mipmap/ic_launcher_round) not found.
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:6:5-25:19: AAPT: error: resource s
tyle/AppTheme (aka com.konspirasisnack:style/AppTheme) not found.
D:\xampp\htdocs\konspirasiSnack\android\app\src\main\AndroidManifest.xml:13:7-23:18: AAPT: error: resource
string/app_name (aka com.konspirasisnack:string/app_name) not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. R
un with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 35s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnat
ive.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
react native versi 0.62.2
distributionUrl=https://services.gradle.org/distributions/gradle-6.0.1-all.zip
os windows 10
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)
ANDROID_HOME = C:\Users\user\AppData\Local\Android\Sdk
JAVA_HOME = C:\Program Files\Java\jdk

Xcode 10 fatal error: lipo: can't open input file

I'm building a static library in objective-c, in Xcode 9 I could build without problem but I'm blocked in Xcode 10.
Initially I had these two problems that I resolved with the answers below
Xcode 10 Error: Multiple commands produce
Xcode 10: unable to attach DB error
Now I have this lipo error, and I already tried the solution of adding arm64 to the valid architecture and build only valid architecture
build settings pictures
** BUILD SUCCEEDED **
fatal error: lipo: can't open input file: /Users/Alex/Library/Developer/Xcode/DerivedData/myNewLibrary-gvpwgkkoffdnkybybgkafnqwepcx/Build/Products/Debug-iphoneos/arm64/myNewLibrary/myNewLibrary (No such file or directory)
Command PhaseScriptExecution failed with a nonzero exit code
Anyone have idea how to resolve ? thanks