Path to cmake in Android - android

When building my Android project in AndroidStudio 3.6.1 I'm getting an error message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':mobile:externalNativeBuildCleanDebug'.
> A problem occurred starting process 'command 'C:\Users\myusername\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe''
cmake is correctly installed but myusername does not exists. Instead, it should be a different folder.
Where can I change the path?

Related

Android Studio - OpenCV project wont build

I followed the instructions to import OpenCV to Android Studio here https://github.com/quickbirdstudios/opencv-android, after Android Studio wouldn't let me use the File > New > Import Module feature. After following the instructions, I get these build errors:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugMainManifest'.
com.android.manifmerger.ManifestMerger2$MergeFailureException: java.io.FileNotFoundException: H:\AndroidProjects\WyzeCloud\Rev1\IPCloud\app\build\intermediates\navigation_json\debug\navigation.json (The system cannot find the file specified)
============================================================================
2: Task failed with an exception.
What went wrong:
Execution failed for task ':app:compressDebugAssets'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CompressAssetsWorkAction
H:\AndroidProjects\WyzeCloud\Rev1\IPCloud\app\build\intermediates\merged_assets\debug\out
============================================================================
BUILD FAILED in 18s
Anyone know what these errors mean, or have a possible solution to importing OpenCV to an Android Studio project?
I faced this problem before and my solution:
Download the Android sdk of Open-CV from this link: https://opencv.org/releases/
Add the java and jni library files into your project. Java functions of this library is works with jni files (.so).

Build failed because of react native reanimated 2

I install react native reanimated 2 according to its installation doc. But when I run project for android build, I get this error:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeDebugNativeLibs'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.MergeJavaResWorkAction
> 2 files found with path 'lib/x86_64/libreactnativejni.so' from inputs:
- D:\ReactBootCamp_RASAHR\Bootcamp Main Projects\ReactNative\SecondVersion\Fooductor\node_modules\react-native-reanimated\android\build\.transforms\1ebd6d22f25011a79a18acd12f297fc9\transformed\jetified-react-native-reanimated-65-hermes\jni
- C:\Users\Kavosh\.gradle\caches\transforms-3\156e8e6ad84734ffd5fbff137e92dae0\transformed\jetified-react-native-0.65.1\jni
If you are using jniLibs and CMake IMPORTED targets, see
https://developer.android.com/r/tools/jniLibs-vs-imported-targets
How can I solve this?

Flutter: Execution failed for task ':background_location:verifyReleaseResources'

My app works fine when I run it or build app packages, but when I try to build apk for release or profile, it gives this message:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':background_location:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
> Android resource linking failed
ERROR:C:\Users\Misha\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\background_location-0.6.1\android\src\main\AndroidManifest.xml:10:9-15:37: AAPT: error: attribute android:foregroundServiceType not found.
I've already tried flutter clean and flutter pub cache repair, as well as updated my Gradle version. Also, I have AndroidX enabled.
Could somebody please help?
Update: I found a solution here

Error while running GitHub action android

GitHub action build failed with the below exception
> Task :app:spotlessKotlinCheck FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:spotlessKotlinCheck'.
The following files had format violations:
app/src/androidTest/java/com/example/androiddevchallenge/ExampleInstrumentedTest.kt
While I running this locally
./gradlew :app:spotlessKotlinCheck
It shows build success.
How to fix this?

Task 'assembleFIRDebugEnabledDebug' not found in root project 'android'

When I run flutter run --flavor FIRDebugEnabled
I get the error:
FAILURE: Build failed with an exception.
* What went wrong:
Task 'assembleFIRDebugEnabledDebug' not found in root project 'android'.
I also tried with flutter run --flavor FIRAnalyticsDebugEnabled
But I get similar error:
FAILURE: Build failed with an exception.
* What went wrong:
Task 'assembleFIRAnalyticsDebugEnabledDebug' not found in root project 'android'.
My goal is to use firebase analytics debug view https://firebase.google.com/docs/analytics/debugview
What am I doing wrong ?

Categories

Resources