bilibili / jni4android Goto Github PK
View Code? Open in Web Editor NEWJNI Generater for Android
JNI Generater for Android
I add a new function in IMediaDataSouce.java want to create a IMediaDataSource.c/h file.
make test have problem understand.
Unknown token at line 9: '"'
ERROR: at line 9
syntax error
make: *** [jni/j4a/class/tv/danmaku/ijk/media/player/misc/IMediaDataSource.c] 错误 1
After download this project, I got a compiling error:
/usr/local/Cellar/llvm@4/4.0.1/bin/../include/c++/v1/wchar.h:119:15: fatal error: 'wchar.h' file not found
#include_next <wchar.h>
^~~~~~~~~
1 error generated.
The current compiling path cannot find wchar.h, or get wrong path.
My work environment is MacOS Catalina v10.15.7,I try many times, but the issue still exists
below is stacktrace. Happened on OPPO R9 Plusm A;Android 5.1.1,level 22
.
why it happend and how could I fix it?
SIGABRT:
#00 pc 0003aee0 /system/lib/libc.so (tgkill+12) [armeabi-v7a::a924decc455c97eed5ca296429f4729a]
#01 pc 00013dad /system/lib/libc.so (pthread_kill+52) [armeabi-v7a::a924decc455c97eed5ca296429f4729a]
#02 pc 00014a27 /system/lib/libc.so (raise+10) [armeabi-v7a::a924decc455c97eed5ca296429f4729a]
#03 pc 00011145 /system/lib/libc.so (__libc_android_abort+36) [armeabi-v7a::a924decc455c97eed5ca296429f4729a]
#04 pc 0000f6ac /system/lib/libc.so (abort+4) [armeabi-v7a::a924decc455c97eed5ca296429f4729a]
#05 pc 00228991 /system/lib/libart.so (_ZN3art7Runtime5AbortEv+160) [armeabi-v7a::177920f6aa8fa37cfbbf6538772cbd0d]
#06 pc 000a7cb7 /system/lib/libart.so (_ZN3art10LogMessageD1Ev+1322) [armeabi-v7a::177920f6aa8fa37cfbbf6538772cbd0d]
#07 pc 00162f11 /system/lib/libart.so (_ZN3art22IndirectReferenceTable3AddEjPNS_6mirror6ObjectE+244) [armeabi-v7a::177920f6aa8fa37cfbbf6538772cbd0d]
#08 pc 001beb31 /system/lib/libart.so (_ZN3art3JNI12NewStringUTFEP7_JNIEnvPKc+280) [armeabi-v7a::177920f6aa8fa37cfbbf6538772cbd0d]
#09 pc 000a8d1d /data/app/com.a.b-2/lib/arm/libijkplayer.so (J4AC_android_os_Bundle__putString__withCString__catchAll+68) [armeabi-v7a::bd17e2bb26f07cc74e8e7dc7f0fdcc7e]
bison.j4a.y Line 151-153: should be
t_class_or_interface:
T_CLASS {$$ = T_CLASS;}
| T_INTERFACE {$$ = T_INTERFACE;}
Enviroment:
OS:Ubuntu 16.04 LTS
flow the build steps,https://github.com/Bilibili/jni4android,
first step is ok:
git clone https://github.com/Bilibili/jni4android.git jni4android
cd jni4android
but second step error:
./get-deps.sh
error info below:
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking whether pragma GCC diagnostic push works... yes
checking whether gcc supports POSIXLY_CORRECT=1... yes
checking whether g++ builds executables that work... yes
checking whether g++ supports POSIXLY_CORRECT=1... yes
checking for flex... no
checking for lex... no
checking for bison... no
checking for byacc... no
checking for ranlib... (cached) ranlib
checking for GNU M4 that supports accurate traces... configure: error: no acceptable m4 could be found in $PATH.
GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended.
GNU M4 1.4.15 uses a buggy replacement strstr on some systems.
Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug.
There seems to be no Makefile in this directory.
You must run ./configure before running 'make'.
GNUmakefile:106: recipe for target 'abort-due-to-no-makefile' failed
make: *** [abort-due-to-no-makefile] Error 1
/home/android/Downloads/jni4android
after run init-android-j4a.sh
cd jni4android-fork folder
./configure and make
make: *** [src/ast_annotation.o] 错误 1
my os is ubuntu 14.04 and g++ is gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)
xxxxq
Wrong C wrapper generated result for all types of primitive type array such as: int[], boolean[], float[]
Example:
public int testIntArray(int[] iArr);
public float testFloatArray(float[] fArr);
public double testDoubleArray(int[] iArr);
Result:
jintArray J4AC_android_os_Test__testIntArray(JNIEnv *env, jobject thiz, jintArray iArr);
jintArray J4AC_android_os_Test__testIntArray__catchAll(JNIEnv *env, jobject thiz, jintArray iArr);
jintArray J4AC_android_os_Test__testIntArray__asGlobalRef__catchAll(JNIEnv *env, jobject thiz, jintArray iArr);
jfloatArray J4AC_android_os_Test__testFloatArray(JNIEnv *env, jobject thiz, jfloatArray fArr);
jfloatArray J4AC_android_os_Test__testFloatArray__catchAll(JNIEnv *env, jobject thiz, jfloatArray fArr);
jfloatArray J4AC_android_os_Test__testFloatArray__asGlobalRef__catchAll(JNIEnv *env, jobject thiz, jfloatArray fArr);
jdouble J4AC_android_os_Test__testDoubleArray(JNIEnv *env, jobject thiz, jintArray iArr);
jdouble J4AC_android_os_Test__testDoubleArray__catchAll(JNIEnv *env, jobject thiz, jintArray iArr);
Expected:
jint J4AC_android_os_Test__testIntArray(JNIEnv *env, jobject thiz, jintArray iArr);
jint J4AC_android_os_Test__testIntArray__catchAll(JNIEnv *env, jobject thiz, jintArray iArr);
jint J4AC_android_os_Test__testIntArray__asGlobalRef__catchAll(JNIEnv *env, jobject thiz, jintArray iArr);
jfloat J4AC_android_os_Test__testFloatArray(JNIEnv *env, jobject thiz, jfloatArray fArr);
jfloat J4AC_android_os_Test__testFloatArray__catchAll(JNIEnv *env, jobject thiz, jfloatArray fArr);
jfloat J4AC_android_os_Test__testFloatArray__asGlobalRef__catchAll(JNIEnv *env, jobject thiz, jfloatArray fArr);
jdouble J4AC_android_os_Test__testDoubleArray(JNIEnv *env, jobject thiz, jintArray iArr);
jdouble J4AC_android_os_Test__testDoubleArray__catchAll(JNIEnv *env, jobject thiz, jintArray iArr);
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.