Add .so File To Android Studio , Execution failed - opencv

I import a project from eclipse to Android Studio. in android studio works fine but no in Android studio.
I load my library here:
static {
try {
System.loadLibrary("opencv_java");
} catch (Exception e) {
// TODO: handle exception
}
}
And i have a folder in app/src/main/jni/armeabi-v7a/ libopencv_java.so
But android Studio says. Execution failed for tast ':app:compileDebugNdk'
which step I need to do?
i only need include one .so file in my proyect.

With Android Studio, you have to put your .so files inside jniLibs/(armeabi-v7a|x86|...) folder if you want them to be included inside your APK.
If you have files under jni folder, Android Studio will try to compile your sources using the NDK and an auto-generated Makefile, that's certainly this task that is currently failing with your project.

Related

What is the location for windbg Preview in windows 10?And how to rename a project name in visual studio 2019?

I got location for windbg in here but opening this exe file it looks different from windbg preview
:- "C:\Program Files (x86)\Windows Kits\10\Debuggers\x64\windbg.exe"
I was unable to change the name so I made another project and copy paste the code now I am getting this error :
*** WARNING: Unable to verify checksum for CDAnalysis.exe
WinDbg Preview is a UWP app, so its binaries span in multiple locations.
Its launcher is at %LocalAppData%\Microsoft\WindowsApps\WinDbgX.exe.

Beginner help: The system cannot find the path specified

I'm just starting to use Dart in Visual Studio code and having some problems.
I've gone into Visual Studio Code, gone to File-->Open Folder..then created a folder with another folder inside, and then selected it. Then I downloaded package-simple through the terminal.Then when I go to explorer, I see that there is already pre-made code..ie under lib, src, there is a simple_console_example.dart file.
When I try to run this file I get a bin/main.dart:1: Error: The system cannot find the path specified.
Any help is appreciated!
If you're running flutter extension in visual studio code for a sub-root directory, then debugging may yield the error whereas flutter run would work.
Solution is to open the sub-directory as folder in visual studio code.
If you're having this error for no apparent reason, try running commands below in the root directory of the project as suggested in this solution:
flutter clean & flutter run
Running
flutter clean & flutter run
from a terminal worked but it didn't fix the issue that I couldn't run a Debug session from within Visual Studio Code. The fix that did it for me was:
The solution is to delete .vscode folder inside your project
which I found here: Issue #29589 on Flutter Github Project
I have the same problem. find out that in my visual studio code at the explorer, i opened the wrong folder for my project. make sure your visual studio code is opening your folder project at the explorer nav bar on the left. File=>Open Folder=>"your project folder file.

Error Conflict with dependency in android studio

I am getting this error in android studio when i try to create a new project. Please help me step to step to deal with it. I am completely new to this IDE. ERROR SCREENSHOT
Error:Execution failed for task ':app:preDebugAndroidTestBuild'.
Conflict with dependency 'com.android.support:support-annotations' in project ':app'. Resolved versions for app (26.1.0) and test app (27.1.1) differ. See https://d.android.com/r/tools/test-apk-dependency-conflicts.html for details.
I found the solution myself, I'd like to leave it here.
Open android studio.
On the left side that project menu (files explorer type)
there will be a option "gradle scripts" clicking on it opens the drop down menu.
There will be a file build.gradle (Module:app)
Double click it, It would open in android studio.
Change to the following in settings:
compileSdkVersion 27
targetSdkVersion 27
implementation 'com.android.support:appcompat-v7:27.1.1'
Sync the files in gradle. You're done.
Android studio would download the files if required.

xamarin.android - Resource.Designer errors after installing Android Studio

I installed Android Studio on the same PC as Xamarin. I wanted to use the same adb as Visual Studio in Android Studio.
(android-sdk path is an option on the initial install screen, but I had to use mklink to get around the fact that VS installs Android sdk at Program Files (x86) - Android Studio doesn't like non alphanumeric characters.
When I returned to Xamarin I could no longer compile, this seemed to be the main error:
C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1183,2): error MSB6006: "aapt.exe" exited with code -1073741819.
Luckily I kept a backup of this folder first, and reverting it did help
c:\Program Files (x86)\Android\android-sdk
Others might need to reinstall Xamarin after deleting / renaming android-sdk folder.
In addition to reverting this file I also had to clear the contents of
MyProject\MyProject.Droid\Resources\Resource.Designer.cs
This file isn't visible in VS, but you can get to it if there are errors to click on.
Don't forget to clean before build.

don't have apk in Bin and cannot build app in monodevelop when update Mono for Android 4.1

After update Mono for Android from 4.0 -> 4.1 ,I have problems:
In Visual Studio : when I start application , it doesn't run application in emulator(I only see message notification at left corner Build successful!) and I cannot see .apk file in Bin
In Mono develope :When I build this app it have error Error MSB4019: The imported project "C:\Program Files (x86)\MonoDevelop\AddIns\BackendBindings\MSBuild\Novell\Novell.MonoDroid.CSharp.targets" was not found. Confirm that the path in the declaration is correct, and that the file exists on disk. (MSB4019)
Does anyone know what might generate these errors?
In VS, you probably need to turn on "Deploy" for your project:
http://docs.xamarin.com/android/Releases/Mono_For_Android_4/Mono_for_Android_4.1.0#Non-modal_Deployment

Resources