Okay before you flag this as a duplicate I have tried the following
No implementation found for native
No implementation found for native Stitch
No Implementation found for native in ndk
No implementation found for native Lcom/jp/algi/
Android NDK C++ JNI (no implementation found for native...)
Android NDK: No implementation found for native xxxxxx
here is my MainActivity.java
public class MainActivity extends Activity {
static {
System.loadLibrary("physfs");
System.loadLibrary("jpeg");
System.loadLibrary("tiff");
System.loadLibrary("mng");
System.loadLibrary("png");
System.loadLibrary("jasper");
System.loadLibrary("lcms");
System.loadLibrary("devil");
System.loadLibrary("mylib");
}
public static native void convert();
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
convert();
}
}
the c file
#include "com_myproject_MainActivity.h"
#include <string.h>
#include <jni.h>
#include <stdio.h>
#include <stdlib.h>
JNIEXPORT void JNICALL Java_com_myproject_MainActivity_convert
(JNIEnv *, jclass){
.....
}
the javah generated header snippet
#define com_myproject_MainActivity_DEFAULT_KEYS_SHORTCUT 2L
#undef com_myproject_MainActivity_DEFAULT_KEYS_SEARCH_LOCAL
#define com_myproject_MainActivity_DEFAULT_KEYS_SEARCH_LOCAL 3L
#undef com_myproject_MainActivity_DEFAULT_KEYS_SEARCH_GLOBAL
#define com_myproject_MainActivity_DEFAULT_KEYS_SEARCH_GLOBAL 4L
/*
* Class: com_myproject_MainActivity
* Method: convert
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_com_myproject_MainActivity_convert
(JNIEnv *, jclass);
#ifdef __cplusplus
}
#endif
#endif
the portion of the android.mk file that sources the C file
#mylib
include $(CLEAR_VARS)
LOCAL_MODULE := libmylib
LOCAL_CFLAGS := -g -Dlinux -DFT2_BUILD_LIBRARY=1 -DPHYSFS_NO_CDROM_SUPPORT=1 -DAL_ALEXT_PROTOTYPES=1 -DHAVE_GCC_DESTRUCTOR=1 -DOPT_GENERIC -DREAL_IS_FLOAT
LOCAL_CPPFLAGS := ${LOCAL_CFLAGS}
LOCAL_C_INCLUDES := \
${DEVIL_SRC_PATH}include \
${DEVIL_SRC_PATH}src-IL/include \
${JASPER_SRC_PATH}src/libjasper/include \
${PNG_SRC_PATH} \
${MNG_SRC_PATH} \
${JPEG_SRC_PATH} \
${LCMS_SRC_PATH}include/ \
${TIFF_SRC_PATH}libtiff/ \
LOCAL_SRC_FILES := com_myproject_MainActivity.c
include $(BUILD_SHARED_LIBRARY)
I have tried the C file as .cpp and used extern "C" in all possible ways no result.
I have also deleted the bin,out,libs and obj folders several times and freshly built.
The code compiles and .so files are made.
But I can't run it this is the log
> 08-02 01:59:07.268: E/Trace(1569): error opening trace file: No such
> file or directory (2) 08-02 01:59:07.268: D/dalvikvm(1569): Trying to
> load lib /data/data/com.myproject/lib/libphysfs.so 0xb63c3518 08-02
> 01:59:07.268: D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/libphysfs.so 0xb63c3518 08-02
> 01:59:07.268: D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/libphysfs.so 0xb63c3518, skipping init
> 08-02 01:59:07.268: D/dalvikvm(1569): Trying to load lib
> /data/data/com.myproject/lib/libjpeg.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/libjpeg.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/libjpeg.so 0xb63c3518, skipping init
> 08-02 01:59:07.268: D/dalvikvm(1569): Trying to load lib
> /data/data/com.myproject/lib/libtiff.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/libtiff.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/libtiff.so 0xb63c3518, skipping init
> 08-02 01:59:07.268: D/dalvikvm(1569): Trying to load lib
> /data/data/com.myproject/lib/libmng.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/libmng.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/libmng.so 0xb63c3518, skipping init 08-02
> 01:59:07.268: D/dalvikvm(1569): Trying to load lib
> /data/data/com.myproject/lib/libpng.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/libpng.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/libpng.so 0xb63c3518, skipping init 08-02
> 01:59:07.268: D/dalvikvm(1569): Trying to load lib
> /data/data/com.myproject/lib/libjasper.so 0xb63c3518 08-02
> 01:59:07.268: D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/libjasper.so 0xb63c3518 08-02
> 01:59:07.268: D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/libjasper.so 0xb63c3518, skipping init
> 08-02 01:59:07.268: D/dalvikvm(1569): Trying to load lib
> /data/data/com.myproject/lib/liblcms.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/liblcms.so 0xb63c3518 08-02 01:59:07.268:
> D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/liblcms.so 0xb63c3518, skipping init
> 08-02 01:59:07.268: D/dalvikvm(1569): Trying to load lib
> /data/data/com.myproject/lib/libdevil.so 0xb63c3518 08-02
> 01:59:07.268: D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/libdevil.so 0xb63c3518 08-02
> 01:59:07.268: D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/libdevil.so 0xb63c3518, skipping init
> 08-02 01:59:07.268: D/dalvikvm(1569): Trying to load lib
> /data/data/com.myproject/lib/libmylib.so 0xb63c3518 08-02
> 01:59:07.268: D/dalvikvm(1569): Added shared lib
> /data/data/com.myproject/lib/libmylib.so 0xb63c3518 08-02
> 01:59:07.268: D/dalvikvm(1569): No JNI_OnLoad found in
> /data/data/com.myproject/lib/libmylib.so 0xb63c3518, skipping init
> 08-02 01:59:07.288: W/dalvikvm(1569): No implementation found for
> native Lcom/myproject/MainActivity;.convert:()V 08-02 01:59:07.288:
> D/AndroidRuntime(1569): Shutting down VM 08-02 01:59:07.288:
> W/dalvikvm(1569): threadid=1: thread exiting with uncaught exception
> (group=0xb5e5e288) 08-02 01:59:07.288: E/AndroidRuntime(1569): FATAL
> EXCEPTION: main 08-02 01:59:07.288: E/AndroidRuntime(1569):
> java.lang.UnsatisfiedLinkError: Native method not found:
> com.myproject.MainActivity.convert:()V 08-02 01:59:07.288:
> E/AndroidRuntime(1569): at com.myproject.MainActivity.convert(Native
> Method) 08-02 01:59:07.288: E/AndroidRuntime(1569): at
> com.myproject.MainActivity.onCreate(MainActivity.java:30) 08-02
> 01:59:07.288: E/AndroidRuntime(1569): at
> android.app.Activity.performCreate(Activity.java:5008) 08-02
> 01:59:07.288: E/AndroidRuntime(1569): at
> android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
> 08-02 01:59:07.288: E/AndroidRuntime(1569): at
> android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
> 08-02 01:59:07.288: E/AndroidRuntime(1569): at
> android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
> 08-02 01:59:07.288: E/AndroidRuntime(1569): at
> android.app.ActivityThread.access$600(ActivityThread.java:130) 08-02
> 01:59:07.288: E/AndroidRuntime(1569): at
> android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
> 08-02 01:59:07.288: E/AndroidRuntime(1569): at
> android.os.Handler.dispatchMessage(Handler.java:99) 08-02
> 01:59:07.288: E/AndroidRuntime(1569): at
> android.os.Looper.loop(Looper.java:137) 08-02 01:59:07.288:
> E/AndroidRuntime(1569): at
> android.app.ActivityThread.main(ActivityThread.java:4745) 08-02
> 01:59:07.288: E/AndroidRuntime(1569): at
> java.lang.reflect.Method.invokeNative(Native Method) 08-02
> 01:59:07.288: E/AndroidRuntime(1569): at
> java.lang.reflect.Method.invoke(Method.java:511) 08-02 01:59:07.288:
> E/AndroidRuntime(1569): at
> com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
> 08-02 01:59:07.288: E/AndroidRuntime(1569): at
> com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553) 08-02
> 01:59:07.288: E/AndroidRuntime(1569): at
> dalvik.system.NativeStart.main(Native Method)
For some reason the method isn't being seen and yet the library is loading....
for what it's worth, I edited this code from here and pulled out what i needed.
Thanx
In the source file you have:
Java_com_myproject_ndk_convert
But the javah has:
Java_com_myproject_MainActivity_convert
The log also says:
No implementation found for native Lcom/myproject/MainActivity;.convert:
Did you mean to write:
Java_com_myproject_MainActivity_convert
Related
I am trying to import native library into my Xamarin Android app. I have built the test.so file and I have included the appropriate Dllopen code. The problem is when I attempt to deploy the app I keep getting a "DllImport error loading library" error thrown. Here is the error in full.
> DllImport attempting to load: 'test'. 07-20 11:07:26.428 D/Mono
> (11429): DllImport error loading library
> '/storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest':
> 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest"
> not found'. 07-20 11:07:26.428 D/Mono (11429): DllImport error
> loading library
> '/storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest.so':
> 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest.so"
> not found'. 07-20 11:07:26.428 D/Mono (11429): DllImport error
> loading library '/system/lib/libtest': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//system/lib/libtest"
> not found'. 07-20 11:07:26.428 D/Mono (11429): DllImport error
> loading library '/system/lib/libtest.so': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//system/lib/libtest.so"
> not found'. 07-20 11:07:26.428 D/Mono (11429): DllImport error
> loading library 'libtest': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/libtest" not found'.
> 07-20 11:07:26.428 D/Mono (11429): DllImport error loading library
> 'libtest.so': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/libtest.so" not found'.
> 07-20 11:07:26.428 D/Mono (11429): DllImport error loading library
> 'test': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/test" not found'. 07-20
> 11:07:26.438 D/Mono (11429): DllImport error loading library
> '/storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest':
> 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest"
> not found'. 07-20 11:07:26.438 D/Mono (11429): DllImport error
> loading library
> '/storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest.so':
> 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest.so"
> not found'. 07-20 11:07:26.438 D/Mono (11429): DllImport error
> loading library '/system/lib/libtest': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//system/lib/libtest"
> not found'. 07-20 11:07:26.438 D/Mono (11429): DllImport error
> loading library '/system/lib/libtest.so': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//system/lib/libtest.so"
> not found'. 07-20 11:07:26.438 D/Mono (11429): DllImport error
> loading library 'libtest': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/libtest" not found'.
> 07-20 11:07:26.438 D/Mono (11429): DllImport error loading library
> 'libtest.so': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/libtest.so" not found'.
> 07-20 11:07:26.438 D/Mono (11429): DllImport error loading library
> 'libtest': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/libtest" not found'.
> 07-20 11:07:26.438 W/Mono (11429): DllImport unable to load library
> 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/libtest" not found'.
> 07-20 11:07:26.438 D/Mono (11429): DllImport attempting to load:
> 'test'. 07-20 11:07:26.438 D/Mono (11429): DllImport error loading
> library
> '/storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest':
> 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest"
> not found'. 07-20 11:07:26.438 D/Mono (11429): DllImport error
> loading library
> '/storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest.so':
> 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//storage/emulated/0/Android/data/XammarinDemo.XammarinDemo/files/.__override__/libtest.so"
> not found'. 07-20 11:07:26.438 D/Mono (11429): DllImport error
> loading library '/system/lib/libtest': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//system/lib/libtest"
> not found'. 07-20 11:07:26.438 D/Mono (11429): DllImport error
> loading library '/system/lib/libtest.so': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm//system/lib/libtest.so"
> not found'. 07-20 11:07:26.438 D/Mono (11429): DllImport error
> loading library 'libtest': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/libtest" not found'.
> 07-20 11:07:26.438 D/Mono (11429): DllImport error loading library
> 'libtest.so': 'dlopen failed: library
> "/data/app/XammarinDemo.XammarinDemo-1/lib/arm/libtest.so" not found'.
I followed the process as described here https://developer.xamarin.com/guides/android/advanced_topics/using_native_libraries/. I confirmed the libtest.so is included in the apk by unzipping it, yet it seems android is having issues locating the .so file. How can I fix this issue?
According the xamarin docs you mention, you can use either path sniffing or the project file to have the linker know what's what.
Now, path sniffing does not really work with visual studio. Your dll's will be put in directories called ARM, ARM64 etc. And the path 'sniffer' expects the path to be like armeabi, armeabi-v7a, and so forth. You can either change the output path for every platform, or change your project file.
In case you go for the project file (which should be edited in manually in an external editor), the result should look something like this:
<ItemGroup>
<EmbeddedNativeLibrary Include="..\CD.AndroidDll\Release\ARM64\libDemo.so">
<Link>lib\arm64\libDemo.so</Link>
<ABI>arm64-v8a</ABI>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedNativeLibrary>
<EmbeddedNativeLibrary Include="..\CD.AndroidDll\Release\ARM\libDemo.so">
<Link>lib\arm\libDemo.so</Link>
<ABI>armeabi-v7a</ABI>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedNativeLibrary>
<EmbeddedNativeLibrary Include="..\CD.AndroidDll\Release\x64\libDemo.so">
<Link>lib\x64\libDemo.so</Link>
<ABI>x86_64</ABI>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedNativeLibrary>
<EmbeddedNativeLibrary Include="..\CD.AndroidDll\Release\x86\libDemo.so">
<Link>lib\x86\libDemo.so</Link>
<ABI>x86</ABI>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedNativeLibrary>
<None Include="Resources\AboutResources.txt" />
The only problem left is armeabi vs armeabi-v7a. It seems that the application does not look into the armeabi folder on a armeabi-v7a device. If you add both ABI definitions to the same linked library, only the second one is used. Neither can you link the same file twice.
Your only option would be to make a manual copy of the library and add that. Or just leave armeabi out altogether. After all, you would have a hard time finding a device which does not support armeabi-v7a nowadays.
I am combining OpenCV with tess-two to make an Android OCR application. It worked perfectly well with OpenCV4Android + custom JNI OpenCV libraries, until I started importing tess-two library. It compiles but does not install:
[2015-08-02 14:43:02 - OpenCV Tutorial 2 - Mixed Processing] Installation failed due to invalid APK file!
[2015-08-02 14:43:02 - OpenCV Tutorial 2 - Mixed Processing] Please check logcat output for more details.
[2015-08-02 14:43:02 - OpenCV Tutorial 2 - Mixed Processing] Launch canceled!
Other posts suggest it's library and reference errors. Indeed, it can install again when I remove ..\tess-two in Properties->Android->Library. Also the tess-two library is compiled correctly, because I sueccesfully compiled and an example project.
And here is the logcat.
08-02 14:46:07.775: D/AndroidRuntime(14699): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
08-02 14:46:07.775: D/AndroidRuntime(14699): CheckJNI is OFF
08-02 14:46:07.785: D/dalvikvm(14699): Trying to load lib libjavacore.so 0x0
08-02 14:46:07.795: D/dalvikvm(14699): Added shared lib libjavacore.so 0x0
08-02 14:46:07.805: D/dalvikvm(14699): Trying to load lib libnativehelper.so 0x0
08-02 14:46:07.805: D/dalvikvm(14699): Added shared lib libnativehelper.so 0x0
08-02 14:46:07.835: E/cutils-trace(14699): Error opening trace file: No such file or directory (2)
08-02 14:46:08.005: D/AndroidRuntime(14699): Calling main entry com.android.commands.pm.Pm
08-02 14:46:08.015: D/zipro(9906): Zip: EOCD not found, /data/local/tmp/OpenCV Tutorial 2 - Mixed Processing.apk is not zip
08-02 14:46:08.015: D/asset(9906): failed to open Zip archive '/data/local/tmp/OpenCV Tutorial 2 - Mixed Processing.apk'
08-02 14:46:08.015: W/PackageParser(9906): Unable to read AndroidManifest.xml of /data/local/tmp/OpenCV Tutorial 2 - Mixed Processing.apk
08-02 14:46:08.015: W/PackageParser(9906): java.io.FileNotFoundException: AndroidManifest.xml
08-02 14:46:08.015: W/PackageParser(9906): at android.content.res.AssetManager.openXmlAssetNative(Native Method)
08-02 14:46:08.015: W/PackageParser(9906): at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:522)
08-02 14:46:08.015: W/PackageParser(9906): at android.content.res.AssetManager.openXmlResourceParser(AssetManager.java:478)
08-02 14:46:08.015: W/PackageParser(9906): at android.content.pm.PackageParser.parsePackageLite(PackageParser.java:787)
08-02 14:46:08.015: W/PackageParser(9906): at com.android.defcontainer.DefaultContainerService$1.getMinimalPackageInfo(DefaultContainerService.java:174)
08-02 14:46:08.015: W/PackageParser(9906): at com.android.internal.app.IMediaContainerService$Stub.onTransact(IMediaContainerService.java:110)
08-02 14:46:08.015: W/PackageParser(9906): at android.os.Binder.execTransact(Binder.java:388)
08-02 14:46:08.015: W/PackageParser(9906): at dalvik.system.NativeStart.run(Native Method)
08-02 14:46:08.015: W/DefContainer(9906): Failed to parse package
08-02 14:46:08.025: W/ActivityManager(455): No content provider found for permission revoke: file:///data/local/tmp/OpenCV Tutorial 2 - Mixed Processing.apk
I added
<uses-sdk android:minSdkVersion="11"
android:targetSdkVersion="15"/>
to AndroidManifest.xml in both the project and the tess-two library. Everything worked.
I am trying to run my Android application but I'm getting this error:
05-26 17:06:30.362: D/AndroidRuntime(8981):
Calling main entry com.android.commands.pm.Pm
05-26 17:08:46.372: D/AndroidRuntime(9000): >>>>>>
AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
05-26 17:08:46.372: D/AndroidRuntime(9000): CheckJNI is OFF
05-26 17:08:46.372: D/dalvikvm(9000): Trying to load lib libjavacore.so 0x0
05-26 17:08:46.422: D/dalvikvm(9000): Added shared lib libjavacore.so 0x0
05-26 17:08:46.422: D/dalvikvm(9000):
Trying to load lib libnativehelper.so 0x0
05-26 17:08:46.422: D/dalvikvm(9000):
Added shared lib libnativehelper.so 0x0
05-26 17:08:46.422: D/dalvikvm(9000):
No JNI_OnLoad found in libnativehelper.so 0x0, skipping init
05-26 17:08:46.442: D/dalvikvm(9000):
Note: class Landroid/app/ ActivityManagerNative ;
has 179 unimplemented (abstract) methods
05-26 17:08:46.522: E/memtrack(9000):
Couldn't load memtrack module (No such file or directory)
05-26 17:08:46.522: E/android.os.Debug(9000):
failed to load memtrack module: - 2
05-26 17:08:46.552: D/AndroidRuntime(9000):
Calling main entry com.android.commands.pm.Pm
What can be the issue?
i can suggest you something, kill adb ,restart eclips and run emullator again.
else go for new updates, go to help->check for updates. if found new updates install it.
Recently I tried kivy, and I am trying to compile the demo in kivy source code to my android phone. But some demo didn't work. After some experiment I found the widget RstDocument make it crash. The code is:
main.py:
from kivy.app import App
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.popup import Popup
from kivy.uix.rst import RstDocument
class Root(FloatLayout):
pass
class editorApp(App):
pass
if __name__ == '__main__':
editorApp().run()
editor.kv:
Root:
BoxLayout:
orientation: 'vertical'
BoxLayout:
size_hint_y: None
height: 30
Button:
text: 'Load'
Button:
text: 'Save'
BoxLayout:
RstDocument:
I compile the python for android by
./distribute -m "kivy"
Maybe I need to compile it with some other packages?
The DDMS output when I run my program in android, which name is rsttry:
11-03 18:55:41.412: I/SmartCardBroadcastReceiver(25845): foundMatchingVendorPackage - Checking for org.demo.rsttry
11-03 18:55:42.652: W/WindowManager(632): Force clearing orientation change: Window{436dbba8 u0 org.demo.rsttry/org.renpy.android.PythonActivity}
11-03 18:55:42.812: I/WindowManager(632): Screen frozen for +2s157ms due to AppWindowToken{43156f10 token=Token{43385fb0 ActivityRecord{428a1668 u0 org.demo.rsttry/org.renpy.android.PythonActivity}}}
11-03 18:55:45.872: D/dalvikvm(25829): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl.so 0x4225cee0
11-03 18:55:45.872: D/dalvikvm(25829): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl.so 0x4225cee0
11-03 18:55:45.872: D/dalvikvm(25829): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl_image.so 0x4225cee0
11-03 18:55:45.872: D/dalvikvm(25829): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl_image.so 0x4225cee0
11-03 18:55:45.872: D/dalvikvm(25829): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsdl_image.so 0x4225cee0, skipping init
11-03 18:55:45.872: D/dalvikvm(25829): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl_ttf.so 0x4225cee0
11-03 18:55:45.872: D/dalvikvm(25829): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl_ttf.so 0x4225cee0
11-03 18:55:45.872: D/dalvikvm(25829): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsdl_ttf.so 0x4225cee0, skipping init
11-03 18:55:45.872: D/dalvikvm(25829): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl_mixer.so 0x4225cee0
11-03 18:55:45.872: D/dalvikvm(25829): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl_mixer.so 0x4225cee0
11-03 18:55:45.872: D/dalvikvm(25829): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsdl_mixer.so 0x4225cee0, skipping init
11-03 18:55:45.872: D/dalvikvm(25829): Trying to load lib /data/app-lib/org.demo.rsttry-1/libpython2.7.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): Added shared lib /data/app-lib/org.demo.rsttry-1/libpython2.7.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libpython2.7.so 0x4225cee0, skipping init
11-03 18:55:45.882: D/dalvikvm(25829): Trying to load lib /data/app-lib/org.demo.rsttry-1/libapplication.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): Added shared lib /data/app-lib/org.demo.rsttry-1/libapplication.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libapplication.so 0x4225cee0, skipping init
11-03 18:55:45.882: D/dalvikvm(25829): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl_main.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl_main.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsdl_main.so 0x4225cee0, skipping init
11-03 18:55:45.882: D/dalvikvm(25829): Trying to load lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_io.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): Added shared lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_io.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): No JNI_OnLoad found in /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_io.so 0x4225cee0, skipping init
11-03 18:55:45.882: D/dalvikvm(25829): Trying to load lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/unicodedata.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): Added shared lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/unicodedata.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): No JNI_OnLoad found in /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/unicodedata.so 0x4225cee0, skipping init
11-03 18:55:45.882: D/dalvikvm(25829): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsqlite3.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): Added shared lib /data/app-lib/org.demo.rsttry-1/libsqlite3.so 0x4225cee0
11-03 18:55:45.882: D/dalvikvm(25829): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsqlite3.so 0x4225cee0, skipping init
11-03 18:55:45.882: D/dalvikvm(25829): Trying to load lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_sqlite3.so 0x4225cee0
11-03 18:55:45.882: E/dalvikvm(25829): dlopen("/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_sqlite3.so") failed: dlopen failed: library "/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_sqlite3.so" not found
11-03 18:55:45.882: D/dalvikvm(25829): Trying to load lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_imaging.so 0x4225cee0
11-03 18:55:45.882: E/dalvikvm(25829): dlopen("/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_imaging.so") failed: dlopen failed: library "/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_imaging.so" not found
11-03 18:55:46.202: I/python(25829): ['/data/data/org.demo.rsttry/files/lib/python2.7/site-packages', '/data/data/org.demo.rsttry/files/lib/site-python']
11-03 18:55:46.202: I/python(25829): Android path ['/data/data/org.demo.rsttry/files/lib/python27.zip', '/data/data/org.demo.rsttry/files/lib/python2.7', '/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload', '/data/data/org.demo.rsttry/files/lib/python2.7/site-packages', '/storage/emulated/0/org.demo.rsttry']
11-03 18:55:46.472: I/python(25829): Error: [('/data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/data/logo/kivy-icon-16.png', '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-16.png', "[Errno 1] Operation not permitted: '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-16.png'"), ('/data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/data/logo/kivy-icon-32.png', '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-32.png', "[Errno 1] Operation not permitted: '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-32.png'"), ('/data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/data/logo/kivy-icon-256.png', '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-256.png', "[Errno 1] Operation not permitted: '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-256.png'"), ('/data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/data/logo/kivy-icon-24.png', '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-24.png', "[Errno 1] Operation not permitted: '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-24.png'"), ('/data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/data/logo/kivy-icon-64.png', '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-64.png', "[Errno 1] Operation not permitted: '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-64.png'"), ('/data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/data/logo/kivy-icon-128.png', '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-128.png', "[Errno 1] Operation not permitted: '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-128.png'"), ('/data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/data/logo/kivy-icon-512.png', '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-512.png', "[Errno 1] Operation not permitted: '/storage/emulated/0/org.demo.rsttry/.kivy/icon/kivy-icon-512.png'"), '/data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/data/logo', '/storage/emulated/0/org.demo.rsttry/.kivy/icon', "[Errno 1] Operation not permitted: '/storage/emulated/0/org.demo.rsttry/.kivy/icon'"]
11-03 18:55:46.572: I/python(25829): [INFO ] [Logger ] Record log in /storage/emulated/0/org.demo.rsttry/.kivy/logs/kivy_14-11-03_0.txt
11-03 18:55:47.612: I/python(25829): /data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:12: RuntimeWarning: import cdrom: No module named cdrom
11-03 18:55:48.902: I/ActivityManager(632): Process org.demo.rsttry:python (pid 25829) (adj 0) has died.
11-03 18:55:48.902: W/ActivityManager(632): Force removing ActivityRecord{428a1668 u0 org.demo.rsttry/org.renpy.android.PythonActivity}: app died, no saved state
11-03 18:58:59.652: D/dalvikvm(26217): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl.so 0x4225d678
11-03 18:58:59.662: D/dalvikvm(26217): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl.so 0x4225d678
11-03 18:58:59.662: D/dalvikvm(26217): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl_image.so 0x4225d678
11-03 18:58:59.662: D/dalvikvm(26217): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl_image.so 0x4225d678
11-03 18:58:59.662: D/dalvikvm(26217): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsdl_image.so 0x4225d678, skipping init
11-03 18:58:59.672: D/dalvikvm(26217): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl_ttf.so 0x4225d678
11-03 18:58:59.672: D/dalvikvm(26217): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl_ttf.so 0x4225d678
11-03 18:58:59.672: D/dalvikvm(26217): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsdl_ttf.so 0x4225d678, skipping init
11-03 18:58:59.672: D/dalvikvm(26217): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl_mixer.so 0x4225d678
11-03 18:58:59.692: D/dalvikvm(26217): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl_mixer.so 0x4225d678
11-03 18:58:59.692: D/dalvikvm(26217): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsdl_mixer.so 0x4225d678, skipping init
11-03 18:58:59.692: D/dalvikvm(26217): Trying to load lib /data/app-lib/org.demo.rsttry-1/libpython2.7.so 0x4225d678
11-03 18:58:59.712: D/dalvikvm(26217): Added shared lib /data/app-lib/org.demo.rsttry-1/libpython2.7.so 0x4225d678
11-03 18:58:59.712: D/dalvikvm(26217): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libpython2.7.so 0x4225d678, skipping init
11-03 18:58:59.752: D/dalvikvm(26217): Trying to load lib /data/app-lib/org.demo.rsttry-1/libapplication.so 0x4225d678
11-03 18:58:59.752: D/dalvikvm(26217): Added shared lib /data/app-lib/org.demo.rsttry-1/libapplication.so 0x4225d678
11-03 18:58:59.752: D/dalvikvm(26217): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libapplication.so 0x4225d678, skipping init
11-03 18:58:59.752: D/dalvikvm(26217): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsdl_main.so 0x4225d678
11-03 18:58:59.752: D/dalvikvm(26217): Added shared lib /data/app-lib/org.demo.rsttry-1/libsdl_main.so 0x4225d678
11-03 18:58:59.752: D/dalvikvm(26217): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsdl_main.so 0x4225d678, skipping init
11-03 18:58:59.752: D/dalvikvm(26217): Trying to load lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_io.so 0x4225d678
11-03 18:58:59.762: D/dalvikvm(26217): Added shared lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_io.so 0x4225d678
11-03 18:58:59.762: D/dalvikvm(26217): No JNI_OnLoad found in /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_io.so 0x4225d678, skipping init
11-03 18:58:59.762: D/dalvikvm(26217): Trying to load lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/unicodedata.so 0x4225d678
11-03 18:58:59.762: D/dalvikvm(26217): Added shared lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/unicodedata.so 0x4225d678
11-03 18:58:59.762: D/dalvikvm(26217): No JNI_OnLoad found in /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/unicodedata.so 0x4225d678, skipping init
11-03 18:58:59.762: D/dalvikvm(26217): Trying to load lib /data/app-lib/org.demo.rsttry-1/libsqlite3.so 0x4225d678
11-03 18:58:59.772: D/dalvikvm(26217): Added shared lib /data/app-lib/org.demo.rsttry-1/libsqlite3.so 0x4225d678
11-03 18:58:59.772: D/dalvikvm(26217): No JNI_OnLoad found in /data/app-lib/org.demo.rsttry-1/libsqlite3.so 0x4225d678, skipping init
11-03 18:58:59.772: D/dalvikvm(26217): Trying to load lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_sqlite3.so 0x4225d678
11-03 18:58:59.772: E/dalvikvm(26217): dlopen("/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_sqlite3.so") failed: dlopen failed: library "/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_sqlite3.so" not found
11-03 18:58:59.772: D/dalvikvm(26217): Trying to load lib /data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_imaging.so 0x4225d678
11-03 18:58:59.782: E/dalvikvm(26217): dlopen("/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_imaging.so") failed: dlopen failed: library "/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload/_imaging.so" not found
11-03 18:58:59.952: I/WindowManager(632): Screen frozen for +681ms due to Window{43032700 u0 Starting org.demo.rsttry}
11-03 18:59:00.272: I/python(26217): ['/data/data/org.demo.rsttry/files/lib/python2.7/site-packages', '/data/data/org.demo.rsttry/files/lib/site-python']
11-03 18:59:00.272: I/python(26217): Android path ['/data/data/org.demo.rsttry/files/lib/python27.zip', '/data/data/org.demo.rsttry/files/lib/python2.7', '/data/data/org.demo.rsttry/files/lib/python2.7/lib-dynload', '/data/data/org.demo.rsttry/files/lib/python2.7/site-packages', '/storage/emulated/0/org.demo.rsttry']
11-03 18:59:00.692: I/python(26217): [INFO ] [Logger ] Record log in /storage/emulated/0/org.demo.rsttry/.kivy/logs/kivy_14-11-03_1.txt
11-03 18:59:01.772: I/python(26217): /data/data/org.demo.rsttry/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:12: RuntimeWarning: import cdrom: No module named cdrom
11-03 18:59:03.202: I/ActivityManager(632): Process org.demo.rsttry:python (pid 26217) (adj 0) has died.
11-03 18:59:03.212: W/ActivityManager(632): Force removing ActivityRecord{43138c20 u0 org.demo.rsttry/org.renpy.android.PythonActivity}: app died, no saved state
My android is version 4.3, with ANDROIDAPI=18. NDK version is r10c. I use ubuntu 14.04.
And I don't use buildozer because it can't download and install build tools(Any idea? The error message is BUILD FAILED
/home/paul/.buildozer/android/platform/android-sdk-21/tools/ant/build.xml:483: SDK does not have any Build Tools installed. And before that I found "Unable to find the latest version for /home/paul/.buildozer/android/platform/android-sdk-21/build-tools"
And return to the original question. If the result is I need to compile python for android with some library, what's that? shouldn't kivy come with it?
Thanks for help!
Haha I'm answering the question from myself :-) I hope my answer is right and it's useful for others
The ddms output is filtered by "kivycatalog". Today I restudied it and looked at the full ddms output, and found error: no module named pygment. I don't know why it's filtered out. (I'm not familiar with android development now, thanks for viewing!)
i had also same problem, Docutils was missing in my case.
i added docutils in Buildozer.specs requirement, problem Solved.
When I start my Kivy app on my Android phone (Samsung GSIII) the splash screen appears then it crashes and returns to my previous screen. After trail and error I settled on the fact that my import of ws4py was causing the error.
I added ws4py to my buildozer.spec file under requirements requirements = kivy,ws4py, and it seems to download correctly while running $>buildozer android debug. Looking through the source code of ws4py and reading the docs, there are no imports other than modules in the standard lib so it doesn't seem to be a dependency issue (but maybe it is?).
The DDMS log is here:
05-02 09:17:29.677: D/dalvikvm(22120): Trying to load lib /data/app-lib/com.shufudesign.drmb-2/libsdl.so 0x422833c8
05-02 09:17:29.687: D/dalvikvm(22120): Added shared lib /data/app-lib/com.shufudesign.drmb-2/libsdl.so 0x422833c8
05-02 09:17:29.687: D/dalvikvm(22120): Trying to load lib /data/app-lib/com.shufudesign.drmb-2/libsdl_image.so 0x422833c8
05-02 09:17:29.697: D/dalvikvm(22120): Added shared lib /data/app-lib/com.shufudesign.drmb-2/libsdl_image.so 0x422833c8
05-02 09:17:29.697: D/dalvikvm(22120): No JNI_OnLoad found in /data/app-lib/com.shufudesign.drmb-2/libsdl_image.so 0x422833c8, skipping init
05-02 09:17:29.697: D/dalvikvm(22120): Trying to load lib /data/app-lib/com.shufudesign.drmb-2/libsdl_ttf.so 0x422833c8
05-02 09:17:29.697: D/dalvikvm(22120): Added shared lib /data/app-lib/com.shufudesign.drmb-2/libsdl_ttf.so 0x422833c8
05-02 09:17:29.697: D/dalvikvm(22120): No JNI_OnLoad found in /data/app-lib/com.shufudesign.drmb-2/libsdl_ttf.so 0x422833c8, skipping init
05-02 09:17:29.697: D/dalvikvm(22120): Trying to load lib /data/app-lib/com.shufudesign.drmb-2/libsdl_mixer.so 0x422833c8
05-02 09:17:29.707: D/dalvikvm(22120): Added shared lib /data/app-lib/com.shufudesign.drmb-2/libsdl_mixer.so 0x422833c8
05-02 09:17:29.707: D/dalvikvm(22120): No JNI_OnLoad found in /data/app-lib/com.shufudesign.drmb-2/libsdl_mixer.so 0x422833c8, skipping init
05-02 09:17:29.707: D/dalvikvm(22120): Trying to load lib /data/app-lib/com.shufudesign.drmb-2/libpython2.7.so 0x422833c8
05-02 09:17:29.727: D/dalvikvm(22120): Added shared lib /data/app-lib/com.shufudesign.drmb-2/libpython2.7.so 0x422833c8
05-02 09:17:29.727: D/dalvikvm(22120): No JNI_OnLoad found in /data/app-lib/com.shufudesign.drmb-2/libpython2.7.so 0x422833c8, skipping init
05-02 09:17:29.727: D/dalvikvm(22120): Trying to load lib /data/app-lib/com.shufudesign.drmb-2/libapplication.so 0x422833c8
05-02 09:17:29.727: D/dalvikvm(22120): Added shared lib /data/app-lib/com.shufudesign.drmb-2/libapplication.so 0x422833c8
05-02 09:17:29.727: D/dalvikvm(22120): No JNI_OnLoad found in /data/app-lib/com.shufudesign.drmb-2/libapplication.so 0x422833c8, skipping init
05-02 09:17:29.727: D/dalvikvm(22120): Trying to load lib /data/app-lib/com.shufudesign.drmb-2/libsdl_main.so 0x422833c8
05-02 09:17:29.727: D/dalvikvm(22120): Added shared lib /data/app-lib/com.shufudesign.drmb-2/libsdl_main.so 0x422833c8
05-02 09:17:29.737: D/dalvikvm(22120): No JNI_OnLoad found in /data/app-lib/com.shufudesign.drmb-2/libsdl_main.so 0x422833c8, skipping init
05-02 09:17:29.737: D/dalvikvm(22120): Trying to load lib /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_io.so 0x422833c8
05-02 09:17:29.737: D/dalvikvm(22120): Added shared lib /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_io.so 0x422833c8
05-02 09:17:29.737: D/dalvikvm(22120): No JNI_OnLoad found in /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_io.so 0x422833c8, skipping init
05-02 09:17:29.737: D/dalvikvm(22120): Trying to load lib /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/unicodedata.so 0x422833c8
05-02 09:17:29.747: D/dalvikvm(22120): Added shared lib /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/unicodedata.so 0x422833c8
05-02 09:17:29.747: D/dalvikvm(22120): No JNI_OnLoad found in /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/unicodedata.so 0x422833c8, skipping init
05-02 09:17:29.747: D/dalvikvm(22120): Trying to load lib /data/app-lib/com.shufudesign.drmb-2/libsqlite3.so 0x422833c8
05-02 09:17:29.757: D/dalvikvm(22120): Added shared lib /data/app-lib/com.shufudesign.drmb-2/libsqlite3.so 0x422833c8
05-02 09:17:29.757: D/dalvikvm(22120): No JNI_OnLoad found in /data/app-lib/com.shufudesign.drmb-2/libsqlite3.so 0x422833c8, skipping init
05-02 09:17:29.757: D/dalvikvm(22120): Trying to load lib /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_sqlite3.so 0x422833c8
05-02 09:17:29.757: D/dalvikvm(22120): Added shared lib /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_sqlite3.so 0x422833c8
05-02 09:17:29.757: D/dalvikvm(22120): No JNI_OnLoad found in /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_sqlite3.so 0x422833c8, skipping init
05-02 09:17:29.767: D/dalvikvm(22120): Trying to load lib /data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_imaging.so 0x422833c8
05-02 09:17:29.767: E/dalvikvm(22120): dlopen("/data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_imaging.so") failed: dlopen failed: library "/data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload/_imaging.so" not found
05-02 09:17:30.488: I/python(22120): ['/data/data/com.shufudesign.drmb/files/lib/python2.7/site-packages', '/data/data/com.shufudesign.drmb/files/lib/site-python']
05-02 09:17:30.488: I/python(22120): Android path ['/data/data/com.shufudesign.drmb/files/lib/python27.zip', '/data/data/com.shufudesign.drmb/files/lib/python2.7', '/data/data/com.shufudesign.drmb/files/lib/python2.7/lib-dynload', '/data/data/com.shufudesign.drmb/files/lib/python2.7/site-packages', '/data/data/com.shufudesign.drmb/files', '/data/data/com.shufudesign.drmb/files/lib/python2.7/site-packages/PIL', '/data/data/com.shufudesign.drmb/files/_applibs']
05-02 09:17:30.908: I/python(22120): [INFO ] [Logger ] Record log in /data/data/com.shufudesign.drmb/files/.kivy/logs/kivy_14-05-02_0.txt
05-02 09:17:31.990: I/python(22120): /data/data/com.shufudesign.drmb/files/lib/python2.7/site-packages/kivy/core/image/img_pygame.py:12: RuntimeWarning: import cdrom: No module named cdrom
05-02 09:17:32.250: I/ActivityManager(610): Process com.shufudesign.drmb:python (pid 22120) (adj 0) has died.
05-02 09:17:32.250: W/ActivityManager(610): Force removing ActivityRecord{42ed13d0 u0 com.shufudesign.drmb/org.renpy.android.PythonActivity}: app died, no saved state
I checked out a few questions on the kivy and python-for-android google groups of people who had the same question about the _imaging.so error. The response seemed to be that is not causing the issue. I stripped out everything in my app except drawing a circle (which works) and then adding the ws4py import (which breaks everything).
Is there something I am missing about adding third party libraries other than adding them to the spec file? Everything works fine when running in Ubuntu. Any help would be greatly appreciated because my app is dependent on web sockets to connect to my backend.
Having the same problem. Adding openssl to the list of required modules fixed the issue (i.e. 'requirements = openssl, ws4py, kivy' in buildozer.spec).
It helped to use snakefood to list the each of the modules loaded by a python script. See list python package dependencies without loading them? for more details.
Have you enabled the INTERNET Android permission?
Also, ws4py has a lot of dependencies you might have to add. I can see problems especially with tornado, gevent, and cython. https://github.com/Lawouach/WebSocket-for-Python/blob/master/requirements/py2kreqs.txt