Xamarin android binding library __AndroidNativeLibraries__.zip.new not found - android

I'm building a binding library which consists of a .jar file and an associated .so file.
The jar file is set with a build action of embeddedjar, while the .so file is set with a build action of embeddednativelibrary
The above is background to the error I'm getting when building the library.
I'm getting the error below:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Bindings.targets: Error: Error executing task CreateNativeLibraryArchive: /Users/jameslavery/Projects/DeviceAPI-Custom/DeviceAPI-Custom/obj/Debug/__AndroidNativeLibraries__.zip.new does not exist (DeviceAPI-Custom)
It appears that the intermediate file
__AndroidNativeLibraries.zip__.new
isn't being created.
Any thoughts/solution?

Related

Error - Zip file app-debug.apk already contains entry 'classes.dex', cannot overwrite

I imported a jar file in app/libs dir and added it as a library in build.gradle file. But when I am building the project getting errors -
Zip file 'E:\AndroidProjects\testing\app\build\intermediates\apk\debug\app-debug.apk' already contains entry 'classes.dex', cannot overwrite
Note - This jar file is created in another environment/ having a different signature.
implementation files('libs/myjar.jar')
This issue looks like this and this - and I have tried deleting/ cleaning the build folder but this error is not going away. I also tried changing the Gradle version to the latest 7.2.1.
I had this error too.
In my case i tried to add a jar file to my app containing a classes.dex file.
I could avoid that error by adding the lib compiled to java byte code rather than dex bytecode.

Android Studio: Uncompiled XML file passed as argument?

I'm trying to build an Android project that hasn't been built in several years and I'm getting this error:
/Users/james/projects/app_project_dir/app/build/intermediates/res/merged/debug/values/com_crashlytics_build_id.xml: error: uncompiled XML file passed as argument. Must be compiled first into .flat file..
error: failed parsing overlays.
What does this error mean? I can't find any file named com_crashlytics_build_id in the project.

Unable to find mixed_sample.so

I'm trying to build tutorial-2-mixedprocess application (in android-studio) that came with the opencv-SDK 3.2.0. But my application crashes because of a missing mixed_sample library
// Load native library after(!) OpenCV initialization
System.loadLibrary("opencv_java3"); //This one is taken care in CmakeLists.txt
Log.d(TAG, "Loaded the opencv"); //This line appears on the monitor
System.loadLibrary("mixed_sample"); // C-R-A-S-H h h h
I looked inside OpenCV-android-sdk/sdk/native/libs directory that came with opencv-3.2.0-android-sdk.zip but *mixed_sample.so is nowhere to be found.
Where to find this file?
EDIT
The full error says following:
java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/org.opencv.samples.tutorial2-1/base.apk"],nativeLibraryDirectories=[/data/app/org.opencv.samples.tutorial2-1/lib/x86, /vendor/lib, /system/lib]]] couldn't find "libmixed_sample.so"
In Android Studio do the following
Create Folder "jniLibs" inside "src/main/"
Put all your .so libraries inside "src/main/jniLibs" folder
just sync gradle again and project. Run your application.
make sure you have put java and jnilibs at proper places.
can you share tree structure of project screenshot?

Error while loading .so file in Android Studio

I am trying to build an app in Android Studio on Windows. This app uses precompiled .so files, which are kept inside the jniLibs directory.
When I try to run my app I get the following error
java.lang.UnsatisfiedLinkError: dlopen failed: library "ld-linux-x86-64.so.2" not found
How can I fix this?

AdMobs causes project error: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode

I'm trying to add adMob to my Android project.
When I add GoogleAdMobAdsSdk-6.4.1.jar to libs folder it gives me a dialog that contains this text
Your project contains error(s), please fix them before running your application.
and in console, it gives me this message
Unable to execute dex: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode;
Conversion to Dalvik format failed: Unable to execute dex: Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode;
Consider that I added the GoogleAdMobAdsSdk-6.4.1.jar in Build path and did clean and restarted the eclipse and it still gives me the error. Also I'm using 'google-play-services_lib' because my app is Google Map Api V2.
When I remove the GoogleAdMobAdsSdk-6.4.1.jar from libs folder, the app runs and gives me ClassNotFound Exception.
I Solved it, The Problem was because I was trying to add GoogleAdMobAdsSdk-6.4.1.jar while using google-play-services_lib I done like what in this link and it now works

Categories

Resources