Construire une unité de soins intensifs avec NDK

Depuis quelques jours, j'ai essayé de comprendre comment mettre en œuvre la bibliothèque ICU pour le support d'Android. J'ai collé tout d'abord, essayant de compiler les sources de l'ICU avec NDK. Je les ai venus d'ici: https://android.googlesource.com/platform/external/icu/

Je l'ai mis dans mon emplacement jni et ajouté dans mon fichier Android.mk cette ligne:

  • Android installLocation et BOOT_COMPLETED
  • Comment changer les fragments à l'aide du tiroir de navigation Android
  • Combien d'appareils Android dois-je besoin pour des tests approfondis?
  • Obtenez le fragment actuel et enregistrez la méthode onSaveInstanceState () pour l'orientation de l'écran
  • Appeler stopSelf () en service pendant que le thread est en cours d'exécution
  • Requête ActiveAndroid Update ()
  • include $(call all-subdir-makefiles) 

    Et ajouté aux drapeaux locaux:

     -DSQLITE_ENABLE_ICU 

    Je reçois beaucoup d'erreurs en essayant de le construire (sur la machine Windows). Voici ma sortie:

     c:/ndk/build/core/build-binary.mk:457: warning: overriding commands for target ` "----my android project location----"//obj/local/armeabi/objs/icui1 8n/smpdtfst.o' c:/ndk/build/core/build-binary.mk:457: warning: ignoring old commands for target `"----my android project location----"//obj/local/armeabi/objs/icu i18n/smpdtfst.o' c:/ndk/build/core/build-binary.mk:457: warning: overriding commands for target ` "----my android project location----"//obj/local/armeabi/objs/icui1 8n_static/smpdtfst.o' c:/ndk/build/core/build-binary.mk:457: warning: ignoring old commands for target `"----my android project location----"//obj/local/armeabi/objs/icu i18n_static/smpdtfst.o' [armeabi] Compile thumb : icui18n <= decContext.c [armeabi] Compile thumb : icui18n <= ucln_in.c [armeabi] Compile thumb : icui18n <= ulocdata.c [armeabi] Compile++ thumb: icui18n <= indiancal.cpp [armeabi] Compile++ thumb: icui18n <= dtptngen.cpp [armeabi] Compile thumb : icui18n <= decNumber.c [armeabi] Compile thumb : icui18n <= utmscale.c [armeabi] Compile++ thumb: icui18n <= dtrule.cpp In file included from "----my android project location----"//jni/ic u/icu4c/source/i18n/../common/unicode/unistr.h:31:0, from "----my android project location----"//jni/ic u/icu4c/source/i18n/../common/unicode/locid.h:34, from "----my android project location----"//jni/ic u/icu4c/source/i18n/unicode/calendar.h:37, from "----my android project location----"//jni/ic u/icu4c/source/i18n/indiancal.h:18, from "----my android project location----"//jni/ic u/icu4c/source/i18n/indiancal.cpp:10: "----my android project location----"//jni/icu/icu4c/source/i18n/.. /common/unicode/std_string.h:33:18: fatal error: string: No such file or directo ry #include <string> ^ compilation terminated. make.exe: *** ["----my android project location----"//obj/local/arm eabi/objs/icui18n/indiancal.o] Error 1 make.exe: *** Waiting for unfinished jobs.... In file included from "----my android project location----"//jni/ic u/icu4c/source/i18n/../common/unicode/unistr.h:31:0, from "----my android project location----"//jni/ic u/icu4c/source/i18n/../common/unicode/strenum.h:14, from "----my android project location----"//jni/ic u/icu4c/source/i18n/../common/unicode/uenum.h:24, from "----my android project location----"//jni/ic u/icu4c/source/i18n/unicode/ucal.h:12, from "----my android project location----"//jni/ic u/icu4c/source/i18n/unicode/udat.h:16, from "----my android project location----"//jni/ic u/icu4c/source/i18n/unicode/datefmt.h:26, from "----my android project location----"//jni/ic u/icu4c/source/i18n/dtptngen.cpp:15: "----my android project location----"//jni/icu/icu4c/source/i18n/.. /common/unicode/std_string.h:33:18: fatal error: string: No such file or directo ry #include <string> ^ compilation terminated. make.exe: *** ["----my android project location----"//obj/local/arm eabi/objs/icui18n/dtptngen.o] Error 1 "----my android project location----"//jni/icu/icu4c/source/i18n/dt rule.cpp: In member function 'UBool icu_54::DateTimeRule::operator==(const icu_5 4::DateTimeRule&) const': "----my android project location----"//jni/icu/icu4c/source/i18n/dt rule.cpp:85:22: error: cannot use typeid with -fno-rtti (typeid(*this) == typeid(that) && ^ "----my android project location----"//jni/icu/icu4c/source/i18n/dt rule.cpp:85:38: error: cannot use typeid with -fno-rtti (typeid(*this) == typeid(that) && ^ make.exe: *** ["----my android project location----"//obj/local/arm eabi/objs/icui18n/dtrule.o] Error 1 

    Et voici mon fichier Android.mk principal situé dans le répertoire jni:

     LOCAL_PATH:= $(call my-dir) include $(call all-subdir-makefiles) include $(CLEAR_VARS) LOCAL_MODULE:= sqlitenative LOCAL_SRC_FILES := sqlite3.c sqlite3_native.cpp # NOTE the following flags, # SQLITE_TEMP_STORE=3 causes all TEMP files to go into RAM. and thats the behavior we want # SQLITE_ENABLE_FTS3 enables usage of FTS3 - NOT FTS1 or 2. # SQLITE_DEFAULT_AUTOVACUUM=1 causes the databases to be subject to auto- vacuum # SQLITE_HAS_CODEC enables crypto support for database LOCAL_CFLAGS += -DHAVE_USLEEP=1 \ -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 \ -DSQLITE_THREADSAFE=1 \ -DNDEBUG=1 \ -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 \ -DSQLITE_DEFAULT_AUTOVACUUM=1 \ -DSQLITE_TEMP_STORE=3 \ -DSQLITE_ENABLE_FTS3 \ -DSQLITE_ENABLE_FTS3_PARENTHESIS \ -DSQLITE_ENABLE_COLUMN_METADATA \ -DSQLITE_ENABLE_ICU \ -DHAVE_STRCHRNUL=0 LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -llog -lc LOCAL_C_INCLUDES += $(call include-path-for, system-core)/cutils LOCAL_SHARED_LIBRARIES += libicuuc \ libicui18n \ libutils LOCAL_SHARED_LIBRARIES += libicuuc-host libicui18n-host LOCAL_STATIC_LIBRARIES := liblog libutils libcutils include $(BUILD_SHARED_LIBRARY) include $(BUILD_HOST_SHARED_LIBRARY) 

  • Android Studio - supprimez l'avertissement d'exception de sécurité
  • Obtenir Lat Lang d'un lieu_id renvoyé par autocomplete place api
  • Android keystore corrompu
  • Création et stockage du fichier journal sur un périphérique dans Android
  • EGL_BAD_MATCH erreur Android Studio
  • Objet non verrouillé par thread avant notification () dans onPostExecute
  • coAndroid est un fan Android de Google, tout sur les téléphones Android, Android Wear, Android Dev et Android Games Apps.