mapsme / omim

🗺️ MAPS.ME — Offline OpenStreetMap maps for iOS and Android
Apache License 2.0
4.55k stars 1.15k forks source link

Error to run android project on Android Studio #10577

Open israteneda opened 5 years ago

israteneda commented 5 years ago

I'm trying to compile the project on Android Studio. I followed the instructions on [Android] How to build project I installed NDK version 19.2.5345600 with SDK Manager on SDK Tools. I ran set_up_android.py, configure.sh, git submodule init, git submodule update, also clone the repo with --recursive flag. This error occurs during the compilation on Android Studio:

API 'variantOutput.getPackageApplication()' is obsolete and has been replaced with 'variant.getPackageApplicationProvider()'.
Debugging obsolete API calls can take time during configuration. It's recommended to not keep it on at all times.

android.debug.obsoleteApi=true

Build command failed.
Error while executing process C:\Users\israt\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HD:\israt\omim -BD:\israt\omim\android\nativeOutputs\cmake\googleBeta\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-16 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=D:\israt\omim\android\build\intermediates\cmake\google\beta\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=C:\Users\israt\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_C_FLAGS=-ffunction-sections -fdata-sections -Wno-extern-c-compat -m32 -DCMAKE_CXX_FLAGS=-fexceptions -frtti -m32 -DCMAKE_TOOLCHAIN_FILE=C:\Users\israt\AppData\Local\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\israt\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja -DANDROID_TOOLCHAIN=clang -DANDROID_STL=c++_static -DOS=windows 10 -DSKIP_TESTS=ON -DUSE_PCH=OFF}
-- Check for working C compiler: C:/Users/israt/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/israt/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/israt/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: C:/Users/israt/AppData/Local/Android/Sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring incomplete, errors occurred!
See also "D:/israt/omim/android/nativeOutputs/cmake/googleBeta/armeabi-v7a/CMakeFiles/CMakeOutput.log".

Setting PLATFORM_ANDROID to true
Build type: Release
CMake Error at CMakeLists.txt:134 (message):
  Certificate check failed

CMakeOutput.log

israteneda commented 5 years ago

I change the gradle version to 4.4 and android plugin version to 3.1.1 and sync failed, external native build issues: error configuring. SIMPLE: Error configuring

alexzatsepin commented 5 years ago

Hi @israteneda ,

Looking at you file path I see that you are trying to build project under Windows OS, right? Unfortunately, building under Windows OS is no longer supported, for last 4 years. You can build it only under Mac or Linux.

israteneda commented 5 years ago

Yes, I am trying to build the project under Windows OS, okay thanks anyway.

alexzatsepin commented 5 years ago

By the way, my colleague has reminded me just now that there is this pull request https://github.com/mapsme/omim/issues/10577 . Probably, it might help you to build the project under Windows. Would be great if you check out the mentioned pull request branch set_up_android_windows in this fork MarkHaakman and let me know whether it works for you or not.

israteneda commented 5 years ago

I checked the mentioned pull request #10488 and commented it. Also, I tried to compile mapsme in another computer with ubuntu system but the same error occurs after follow [Android] How to build project and INSTALL.md steps.

External Native Build Issues:
Error configuring
SIMPLE: Error configuring