I get this error while integrating openCV with android studio.
I am new to android and not able to understand why this error occurs.
Error:Execution failed for task ':app:compileDebugNdk'.
Error: Your project contains C++ files but it is not using a supported native build system.
Consider using CMake or ndk-build integration with the stable Android Gradle plugin:
https://developer.android.com/studio/projects/add-native-code.html
or use the experimental plugin:
https://developer.android.com/studio/build/experimental-plugin.html.
I suggest that you should try one of the NDK examples provided by Google, and become familiar with using the NDK before trying a large library like OpenCV on Android Studio. The answers here are quite detailed, and can be helpful.
Related
So, I was trying to use fragment testing library androidx.fragment:fragment-testing:1.2.4 in a dynamic feature module. When I used Android Gradle Plugin (AGP) version 3.6.3, it failed to build with an error
AAPT: error: resource style/FragmentScenarioEmptyFragmentActivityTheme (aka com.example.reminder.test:style/FragmentScenarioEmptyFragmentActivityTheme) not found.
And so I was curious and checkout the codelab github and try to upgrade the AGP on that project to 3.6.3 and it can build successfully. But the codelab does not use Dynamic Features.
So I tried to actually run a fragment test in my app module only (excluding the dynamic features module) and yes it can build successfully too.
But I still need to test my fragment in the dynamic features module, so I tried playing with the version one by one and then when I downgrade the AGP version to 3.4.1 it can build successfully.
And I found out that since AGP version 3.5.0 and above, it just failed to build with the same error above.
So,
AGP 3.5.0 and above:
- Building test on app module only -> works
- Building test on dynamic features -> failed to build
AGP 3.4.2 and below:
- Building test on app module only -> works
- Building test with dynamic features -> works
But I still want to use AGP 3.6.0 because I want to utilise viewBinding.
So does anyone know how to resolve the error above for fragment testing with dynamic features module?
Upgrading AGP to 4.0.0 and above should resolve the issue.
I am trying to import an android ocr project from Eclipse(juno) to Android Studio. However faces the following error.
Error:Execution failed for task ':eyestwo:compileReleaseNdk'.
Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration.
I have tried searching for solution for this problem and found several solutions from this links:
After updating Android Studio to version 1.3.0 I am getting "NDK integration is deprecated in the current plugin" Error
NDK Integration in Android Studio Error
However, both methods did not work for me as the 2nd method leads to the error:
"Gradle DSL method not found:'sourceSets()'"
The 1st method leads to the error as shown below when I try to run the application:
The source code I used is from here: https://github.com/TheWall89/AndrOCR
Follow this guide and u'll get the correct result... I have done this before..
Tess Two guide for android studio
My project source code
I am taking Coursera Programming Mobile Applications for Android handheld systems course and when I try to run labs I get the error:
(24, 24): failed to resolve:
com.jayway.android.robotium:robotium-solo:5.3.1
My system is using a Proxi, but I adjust AS so updates and component are available. What should I do to resolve this error?
To be able to use a lib project you need to include it in your application's settings.gradle add:
include '..:ExpandableButtonMenu:library'
compile project(':..:ExpandableButtonMenu:library')
Good link visit "how to build an android library with android studio and gradle
Im trying to get sinch going, and I am following their tutorial form here.
https://www.sinch.com/tutorials/android-messaging-tutorial-using-sinch-and-parse/
step one is download the skelton and do the gradle build, however first error was unsporrted version of gradle. android studio fixed it automatically and re-imported. and then i get this error:
Error:(15, 0) Gradle DSL method not found: 'runProguard()'
Possible causes:The project 'messenger' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper fileThe build file may be missing a Gradle plugin.
Apply Gradle plugin
I'm new to android programming and android studio, so I'm kinda lost. How can i get this built and continue with the tutorial?
To comply with the newer versions of Gradle, change 'runProguard' to 'minifyEnabled'
in my case, i am using sinch 3.11.1.
it is aar file.
so you need to import aar file.
after that you can use sinch on your project.
to import aar file you can follow this video (it is not mine):
https://www.youtube.com/watch?v=J-GbMTa1fX0
hope it helps.
I am trying to import an unity3d project to my android project as a module. All is okay, gradle sync finish without error, but when i add unity project as dependency to my project and run gradle sync then it says:
Error:Dependency myapplication:unityproject:unspecified on project app resolves to an APK archive which is not supported as a compilation dependency. File: /Users/michal/Documents/Projects/myapplication/unityproject/build/outputs/apk/unityproject-release-unsigned.apk
I tried google it, but with no luck... Thanks a lot for any tips...
I am using Android Studio (if it helps)
I can build and run standalone unity3d project on mobile device, problem is only when i am trying to add it as module (dependency) to another project
In your library's gradle.build, Change the line apply plugin: com.android.application to apply plugin: com.android.library and remove the setApplicationId
In Android Studio, you can't depend on an Android Application module (which has an APK as its output). You can only depend on Java libraries (which compile to JAR) or Android Library modules (which compile to AAR).
I'm an android noob, but I was able to import a simple Unity app into Android Studio by checking "Google Android Project" in the export dialog.
Deets:
* Unity 4.6.1
* Android Studio 1.0
(note if you download A.S. "1.0", you still need to do a software update a couple times to really get it)