FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class com.yqritc.scalablevideoview.BuildConfig found in modules jetified-Android-ScalableVideoView-10e7b4da8b-runtime (com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b) and jetified-android-scalablevideoview-1.0.4-runtime (com.yqritc:android-scalablevideoview:1.0.4)
Duplicate class com.yqritc.scalablevideoview.PivotPoint found in modules jetified-Android-ScalableVideoView-10e7b4da8b-runtime (com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b) and jetified-android-scalablevideoview-1.0.4-runtime (com.yqritc:android-scalablevideoview:1.0.4)
Duplicate class com.yqritc.scalablevideoview.ScalableType found in modules jetified-Android-ScalableVideoView-10e7b4da8b-runtime (com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b) and jetified-android-scalablevideoview-1.0.4-runtime (com.yqritc:android-scalablevideoview:1.0.4)
Duplicate class com.yqritc.scalablevideoview.ScalableVideoView found in modules jetified-Android-ScalableVideoView-10e7b4da8b-runtime (com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b) and jetified-android-scalablevideoview-1.0.4-runtime (com.yqritc:android-scalablevideoview:1.0.4)
Duplicate class com.yqritc.scalablevideoview.ScaleManager found in modules jetified-Android-ScalableVideoView-10e7b4da8b-runtime (com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b) and jetified-android-scalablevideoview-1.0.4-runtime (com.yqritc:android-scalablevideoview:1.0.4)
Duplicate class com.yqritc.scalablevideoview.ScaleManager$1 found in modules jetified-Android-ScalableVideoView-10e7b4da8b-runtime (com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b) and jetified-android-scalablevideoview-1.0.4-runtime (com.yqritc:android-scalablevideoview:1.0.4)
Duplicate class com.yqritc.scalablevideoview.Size found in modules jetified-Android-ScalableVideoView-10e7b4da8b-runtime (com.github.adityaxjha:Android-ScalableVideoView:10e7b4da8b) and jetified-android-scalablevideoview-1.0.4-runtime (com.yqritc:android-scalablevideoview:1.0.4)
I can't solve this problem, any suggestions? I also examined the issues, but I couldn't get any results from what I tried.
I fixed this issue in
android => build.gradle file in react-native-video-processing package.
instead of
implementation 'com.yqritc:android-scalablevideoview:1.0.4'
I was able to solve it by putting
implementation 'com.github.adityaxjha:AndroidScalableVideoView:10e7b4da8b'
Because it was actually forced to call the same packages with different versions.
Related
I'm really new to mobile development and I'm trying to implement authentication in a simple react-native app using react-native-msal.
I'm using React Native CLI (ie npx react-native run-android) and after initializing a new app and confirming all is working my my virtual device, I added react-native-msal and followed the directions to set things up for android.
But after running the areact-native-msal, the build fails with "Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0."
I've tried changing versions in the gradle-wrapper.properties file but I don't get any further.
PS C:\Working\MSALDemo> npx react-native run-android
npm WARN config global `--global`, `--local` are deprecated. Use `--location=global` instead.
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 941 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
> Configure project :app
Unable to detect AGP versions for included builds. All projects in the build should use the same AGP version. Class name for the included build object: org.gradle.composite.internal.DefaultIncludedBuild$IncludedBuildImpl_Decorated.
> Task :react-native-msal:compileDebugJavaWithJavac
> Task :app:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.3.3/userguide/command_line_interface.html#sec:command_line_warnings
48 actionable tasks: 42 executed, 6 up-to-date
Warning: This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Note: C:\Working\MSALDemo\node_modules\react-native-msal\android\src\main\java\com\reactnativemsal\RNMSALModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Working\MSALDemo\node_modules\react-native-msal\android\src\main\java\com\reactnativemsal\RNMSALModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\newarchitecture\MainApplicationReactNativeHost.java:22: error: cannot find symbol
import com.msaldemo.BuildConfig;
^
symbol: class BuildConfig
location: package com.msaldemo
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainActivity.java:36: error: cannot find symbol
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
^
symbol: variable BuildConfig
location: class MainActivityDelegate
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:22: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:45: error: cannot find symbol
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:45: error: illegal parenthesized expression
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:56: error: cannot find symbol
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:70: error: cannot find symbol
if (BuildConfig.DEBUG) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:70: error: illegal parenthesized expression
if (BuildConfig.DEBUG) {
^
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\newarchitecture\MainApplicationReactNativeHost.java:42: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
location: class MainApplicationReactNativeHost
Note: C:\Working\MSALDemo\android\app\src\debug\java\com\msaldemo\ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 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 17s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Warning: This version only understands SDK XML versions up to 2 but an SDK XML file of version 3 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times.
Note: C:\Working\MSALDemo\node_modules\react-native-msal\android\src\main\java\com\reactnativemsal\RNMSALModule.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: C:\Working\MSALDemo\node_modules\react-native-msal\android\src\main\java\com\reactnativemsal\RNMSALModule.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\newarchitecture\MainApplicationReactNativeHost.java:22: error: cannot find symbol
import com.msaldemo.BuildConfig;
^
symbol: class BuildConfig
location: package com.msaldemo
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainActivity.java:36: error: cannot find symbol
reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
^
symbol: variable BuildConfig
location: class MainActivityDelegate
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:22: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:45: error: cannot find symbol
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:45: error: illegal parenthesized expression
if (BuildConfig.IS_NEW_ARCHITECTURE_ENABLED) {
^
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:56: error: cannot find symbol
ReactFeatureFlags.useTurboModules = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:70: error: cannot find symbol
if (BuildConfig.DEBUG) {
^
symbol: variable BuildConfig
location: class MainApplication
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\MainApplication.java:70: error: illegal parenthesized expression
if (BuildConfig.DEBUG) {
^
C:\Working\MSALDemo\android\app\src\main\java\com\msaldemo\newarchitecture\MainApplicationReactNativeHost.java:42: error: cannot find symbol
return BuildConfig.DEBUG;
^
symbol: variable BuildConfig
location: class MainApplicationReactNativeHost
Note: C:\Working\MSALDemo\android\app\src\debug\java\com\msaldemo\ReactNativeFlipper.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
9 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 17s
at makeError (C:\Working\MSALDemo\node_modules\execa\index.js:174:9)
at C:\Working\MSALDemo\node_modules\execa\index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (C:\Working\MSALDemo\node_modules\#react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Working\MSALDemo\node_modules\#react-native-community\cli\build\index.js:192:9)
info Run CLI with --verbose flag for more details.
PS C:\Working\MSALDemo>
Figured out the missing piece, courtesy of this LinkedIn article.
I needed to
declare a dependency on MSAL in the app's build.gradle file:
implementation "com.microsoft.identity.client:msal:1.0+"
Add the following maven repository to your project's build.gradle:
allProjects {
repositories {
// ...
maven {
url "https://pkgs.dev.azure.com/MicrosoftDeviceSDK/DuoSDK-Public/_packaging/Duo-SDK-Feed/maven/v1"
}
}
}
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'
On a fresh clone of Discourse Mobile from their GitHub repository I come across this error when running "react-native run-android". This application seems to work fine on IOS, but has this issue on Android.
I have already tried messing with different versions and clearing NPM cache and reinstalling all dependencies.
Here is the entire stack trace
info JS server already running.
info Building and installing the app on the device (cd android && gradlew.bat app:installDebug)...
> Configure project :#react-native-community_async-storage
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
> Configure project :app
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
> Configure project :react-native-device-info
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Configure project :react-native-fabric
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (26.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Configure project :react-native-firebase
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
react-native-firebase: using React Native prebuilt binary from C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native\android
> Configure project :react-native-key-pair
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Configure project :react-native-orientation
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
WARNING: The specified Android SDK Build Tools version (23.0.1) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '23.0.1'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Configure project :react-native-vector-icons
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
> Configure project :react-native-webview
WARNING: The following project options are deprecated and have been removed:
android.useDeprecatedNdk
NdkCompile is no longer supported
:react-native-webview:reactNativeAndroidRoot C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native\android
> Task :react-native-firebase:compileDebugJavaWithJavac FAILED
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\analytics\RNFirebaseAnalyticsPackage.java:3: error: package android.support.annotation does not exist
import android.support.annotation.RequiresPermission;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:7: error: cannot find symbol
import android.support.v4.app.NotificationManagerCompat;
^
symbol: class NotificationManagerCompat
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:8: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:5: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:15: error: cannot find symbol
import android.support.v4.app.NotificationCompat;
^
symbol: class NotificationCompat
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:16: error: cannot find symbol
import android.support.v4.app.RemoteInput;
^
symbol: class RemoteInput
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:407: error: package NotificationCompat does not exist
private NotificationCompat.Action createAction(
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:494: error: cannot find symbol
private RemoteInput createRemoteInput(Bundle remoteInput) {
^
symbol: class RemoteInput
location: class DisplayNotificationTask
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseBackgroundNotificationActionReceiver.java:8: error: cannot find symbol
import android.support.v4.app.RemoteInput;
^
symbol: class RemoteInput
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:20: error: package android.support.annotation does not exist
import android.support.annotation.RequiresApi;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:21: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:10: error: cannot find symbol
import android.support.v4.app.RemoteInput;
^
symbol: class RemoteInput
location: package android.support.v4.app
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:11: error: package android.support.v4.content does not exist
import android.support.v4.content.LocalBroadcastManager;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\ReactNativeFirebaseAppRegistrar.java:20: error: package android.support.annotation does not exist
import android.support.annotation.Keep;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\ReactNativeFirebaseAppRegistrar.java:29: error: cannot find symbol
#Keep
^
symbol: class Keep
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\storage\RNFirebaseStoragePackage.java:3: error: package android.support.annotation does not exist
import android.support.annotation.RequiresPermission;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\analytics\RNFirebaseAnalyticsPackage.java:17: error: cannot find symbol
#RequiresPermission(
^
symbol: class RequiresPermission
location: class RNFirebaseAnalyticsPackage
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:370: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:384: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:398: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:414: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:457: error: cannot find symbol
#RequiresApi(api = 26)
^
symbol: class RequiresApi
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\storage\RNFirebaseStoragePackage.java:17: error: cannot find symbol
#RequiresPermission(
^
symbol: class RequiresPermission
location: class RNFirebaseStoragePackage
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:36: error: cannot find symbol
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
^
symbol: class LocalBroadcastManager
location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:36: error: cannot find symbol
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessaging.java:90: error: cannot find symbol
Boolean enabled = NotificationManagerCompat
^
symbol: variable NotificationManagerCompat
location: class RNFirebaseMessaging
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:26: error: cannot find symbol
LocalBroadcastManager
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:41: error: cannot find symbol
LocalBroadcastManager
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\messaging\RNFirebaseMessagingService.java:51: error: cannot find symbol
LocalBroadcastManager
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseMessagingService
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:81: error: package NotificationCompat does not exist
NotificationCompat.Builder nb;
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:84: error: package NotificationCompat does not exist
nb = new NotificationCompat.Builder(context, channelId);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:87: error: package NotificationCompat does not exist
nb = new NotificationCompat.Builder(context);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:130: error: package NotificationCompat does not exist
NotificationCompat.BigPictureStyle bp = new NotificationCompat.BigPictureStyle();
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:130: error: package NotificationCompat does not exist
NotificationCompat.BigPictureStyle bp = new NotificationCompat.BigPictureStyle();
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:158: error: package NotificationCompat does not exist
NotificationCompat.BigTextStyle bt = new NotificationCompat.BigTextStyle();
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:158: error: package NotificationCompat does not exist
NotificationCompat.BigTextStyle bt = new NotificationCompat.BigTextStyle();
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:361: error: package NotificationCompat does not exist
NotificationCompat.Action action = createAction(context, a, intentClass, notification);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:424: error: package NotificationCompat.Action does not exist
NotificationCompat.Action.Builder ab = new NotificationCompat.Action.Builder(
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:424: error: package NotificationCompat.Action does not exist
NotificationCompat.Action.Builder ab = new NotificationCompat.Action.Builder(
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:437: error: cannot find symbol
RemoteInput remoteInput = createRemoteInput(ri);
^
symbol: class RemoteInput
location: class DisplayNotificationTask
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:496: error: package RemoteInput does not exist
RemoteInput.Builder rb = new RemoteInput.Builder(resultKey);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\DisplayNotificationTask.java:496: error: package RemoteInput does not exist
RemoteInput.Builder rb = new RemoteInput.Builder(resultKey);
^
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseBackgroundNotificationActionReceiver.java:62: error: cannot find symbol
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
^
symbol: variable RemoteInput
location: class RNFirebaseBackgroundNotificationActionReceiver
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotificationManager.java:204: error: cannot find symbol
LocalBroadcastManager
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseNotificationManager
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:54: error: cannot find symbol
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
^
symbol: class LocalBroadcastManager
location: class RNFirebaseNotifications
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:54: error: cannot find symbol
LocalBroadcastManager localBroadcastManager = LocalBroadcastManager.getInstance(context);
^
symbol: variable LocalBroadcastManager
location: class RNFirebaseNotifications
C:\Users\Emmett Deen\Documents\BlackAirplane\DiscourseMobile\node_modules\react-native-firebase\android\src\main\java\io\invertase\firebase\notifications\RNFirebaseNotifications.java:308: error: cannot find symbol
Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);
^
symbol: variable RemoteInput
location: class RNFirebaseNotifications
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
47 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':react-native-firebase: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
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.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3s
72 actionable tasks: 1 executed, 71 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.
I'm trying to add libconfig++ to my CMake project, but it still complains
Libconfig library is config++
...
CMakeFiles/CustomCamReaderTask.dir/acA2440-20gc_ConfigUtility.cc.o: undefined reference to symbol '_ZN13ConfigSection3getERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERl'
.../lib/libconfig.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
Here is my CMakeLists.txt
find_package(PkgConfig)
pkg_check_modules(LIBCONFIG_PLUSPLUS libconfig++ REQUIRED)
add_executable(CustomCamReaderTask
CustomCamReaderTask.cc
acA2440-20gc_ConfigUtility.cc)
target_include_directories(CustomCamReaderTask
PRIVATE ${CMAKE_SOURCE_DIR}/src/include/Pylon5
/opt/pylon5/include)
message("Libconfig library is ${LIBCONFIG_PLUSPLUS_LIBRARIES}")
target_link_libraries(CustomCamReaderTask
${LIBCONFIG_PLUSPLUS_LIBRARIES}
${PYLON_LIBS}
task
imageUtility
${OPENCV_LIBRARIES})
link_directories(/opt/pylon5/lib64)
link_libraries(${LIBCONFIG_PLUSPLUS_LIBRARIES})
It seems to find config++, I linked the directory, linked the library, not sure what else is wrong..
In my project, in the "configure" phase my CMake seems to find glog, but in the building phase I receive the error message: cannot find -llibglog
It makes no difference if I use
sudo apt-get install libgoogle-glog-dev
or generate glog from source. Recently I had to ugrade to Ubuntu 16.04 from 14.04, and have series of problems, from source redefinition problems to building problems like this.
Edited:
It is a complex project, with many subprojects and packages, so it would not fair to post so many files. And, it worked before upgrading.
The relevant parts:
(FindGlog.cmake)
find_package_handle_standard_args(Glog DEFAULT_MSG GLOG_INCLUDE_DIR GLOG_LIBRARY)
if(GLOG_FOUND)
set(GLOG_INCLUDE_DIRS ${GLOG_INCLUDE_DIR})
set(GLOG_LIBRARIES ${GLOG_LIBRARY})
message(STATUS "Found glog (include: ${GLOG_INCLUDE_DIR}, library: ${GLOG_LIBRARY})")
mark_as_advanced(GLOG_ROOT_DIR GLOG_LIBRARY_RELEASE GLOG_LIBRARY_DEBUG
GLOG_LIBRARY GLOG_INCLUDE_DIR)
endif()
and CMakeLists.txt
target_link_libraries(
simtest
libmain
libglog
${Pthread}
)
and the message
/usr/bin/ls: cannot find --libglog