AndroidTensorFlowMachineLearningExample icon indicating copy to clipboard operation
AndroidTensorFlowMachineLearningExample copied to clipboard

cant build .so file

Open mujtaba-faizi opened this issue 7 years ago • 10 comments

I followed the steps to your blog but I get an error about c/c++ files in the cpp folder(created by itself). I dont know how you built the .so file. I have built the jar file fine.

mujtaba-faizi avatar Jan 07 '18 12:01 mujtaba-faizi

Now, there is no need to build that as it has been published as a library. You can directly compile it from the gradle.

amitshekhariitbhu avatar Jan 08 '18 13:01 amitshekhariitbhu

I get this error "Your project contains C++ files but it is not using a supported native build system". I just build the gradle, i dont know why i had to change the workspace of tensorflow.

mujtaba-faizi avatar Jan 08 '18 14:01 mujtaba-faizi

If i just add the dependency compile 'org.tensorflow:tensorflow-android:+' in build.gradle, what files do i have to remove from my project which you mentioned in the blog? Also, will i need to add something else to the activity code? Thanks on advance.

mujtaba-faizi avatar Jan 08 '18 14:01 mujtaba-faizi

Yes, just add the dependency. Do not build the so file.

amitshekhariitbhu avatar Jan 08 '18 14:01 amitshekhariitbhu

Thanks for the quick reply. So i dont need the .so file? All will work fine without it?

mujtaba-faizi avatar Jan 08 '18 14:01 mujtaba-faizi

Yes

amitshekhariitbhu avatar Jan 08 '18 14:01 amitshekhariitbhu

Now I'm getting the error after building gradle: Execution failed for task':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.

com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

mujtaba-faizi avatar Jan 08 '18 15:01 mujtaba-faizi

I am having the same issue with the DexMergerForDebug error, and have not been able to fix for weeks. Did you find a fix @mujtaba-faizi ?

ryan-radloff avatar Feb 18 '18 22:02 ryan-radloff

Does it have any problems in different versions of tensorflow?I have build my own model on android by this way , but i get the error that failed to open my moudel.pb

SLEEP-CO avatar Jul 20 '18 14:07 SLEEP-CO

I hope you can give me your hands .

SLEEP-CO avatar Jul 20 '18 14:07 SLEEP-CO