boyliang / ndk-patch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

patch后遇到错误

difcareer opened this issue · comments

我patch了之后编译遇到了如下错误,请问该如何解决?

Android NDK: WARNING: APP_PLATFORM android-16 is larger than android:minSdkVersion 14 in ./AndroidManifest.xml
Android NDK: WARNING:jni/Android.mk:onehook: non-system libraries in linker flags: -landroid_runtime -lart -ldvm
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
[armeabi] Compile++ thumb: onehook <= JavaMethodHook.cpp
[armeabi] Compile++ thumb: onehook <= ArtMethodHook.cpp
In file included from jni/JavaHook/ArtMethodHook.cpp:3:0:
jni/JavaHook/art_object_4_4.h:221:70: error: expected ')' before '::' token
mirror::Object* GetThisObject() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:221:43: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
mirror::Object* GetThisObject() const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:223:86: error: expected ')' before '::' token
mirror::Object* GetThisObject(uint16_t num_ins) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:223:59: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
mirror::Object* GetThisObject(uint16_t num_ins) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:379:68: error: expected ')' before '::' token
bool IsValidIndex(int32_t index) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:379:41: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
bool IsValidIndex(int32_t index) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:395:53: error: expected ')' before '::' token
T Get(int32_t i) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:395:26: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
T Get(int32_t i) const SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);
^
jni/JavaHook/art_object_4_4.h:616:59: error: expected ')' before '::' token
Class* GetSuperClass() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:616:31: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
Class* GetSuperClass() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
jni/JavaHook/art_object_4_4.h:624:60: error: expected ')' before '::' token
DexCache* GetDexCache() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
jni/JavaHook/art_object_4_4.h:42:74: note: in definition of macro 'SHARED_LOCKS_REQUIRED'
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:42:87: warning: 'shared_locks_required' attribute directive ignored [-Wattributes]
#define SHARED_LOCKS_REQUIRED(...) attribute ((shared_locks_required(VA_ARGS)))
^
jni/JavaHook/art_object_4_4.h:624:32: note: in expansion of macro 'SHARED_LOCKS_REQUIRED'
DexCache* GetDexCache() const SHARED_LOCKS_REQUIRED (Locks::mutator_lock_){
^
make.exe: *** [obj/local/armeabi/objs/onehook/JavaHook/ArtMethodHook.o] Error 1