Open SergeyKatugin opened 6 years ago
this file detect eclipse IDE and broke correct url(because has a folder with name libs
), when you use cordova 7+ version
После того, как поменяли libs
на thirdparty-libs
выскакивает такая ошибка при билде:
* What went wrong:
Could not resolve all files for configuration ':app:releaseCompileClasspath'.
> Could not find :mobmetricalib-2.78:.
Searched in the following locations:
file:/private/var/www/balu/balumates-ru-frontend/cordova/platforms/android/app/libs/mobmetricalib-2.78-.aar
file:/private/var/www/balu/balumates-ru-frontend/cordova/platforms/android/app/libs/mobmetricalib-2.78.aar
Required by:
project :app
@artuska поменяй ещё в файле platforms/android/build.gradle
в 5 строчке libs
на thirdparty-libs
Ну он всё равно пытается искать в папке /app
— что libs
, что thirdparty-libs
:
* What went wrong:
Could not resolve all files for configuration ':app:releaseCompileClasspath'.
> Could not find :mobmetricalib-2.78:.
Searched in the following locations:
file:/private/var/www/balu/balumates-ru-frontend/cordova/platforms/android/app/thirdparty-libs/mobmetricalib-2.78-.aar
file:/private/var/www/balu/balumates-ru-frontend/cordova/platforms/android/app/thirdparty-libs/mobmetricalib-2.78.aar
Required by:
project :app
В общем, всё равно получаю ошибку:
cordova plugin add yandex-appmetrica-plugin-cordova --save
Failed to install 'yandex-appmetrica-plugin-cordova': Error: ENOENT: no such file or directory, open '/private/var/www/balu/balumates-ru-frontend/cordova/platforms/android/AndroidManifest.xml'
Предлагаю такое решение: в файле build.gradle
ничего не менять, в файле plugin.xml
заменить libs
на app/libs
. Также удалить android платформу и плагин, затем занаво добавить android платформу и уже измененный плагин.
Проводил такие действия:
cordova create hello com.example.hello HelloWorld
cd hello
cordova platform add android
git clone https://github.com/yandexmobile/metrica-plugin-cordova.git metrica-plugin
metrica-plugin/plugin.xml
в 31 строчек libs/
на app/libs/
cordova plugin add metrica-plugin --save
cordova build android
Плагин добавляется и проект успешно собирается
P.S. cordova - 8.0.0, android - 7.0.0
@NesterovichAlexey вы это поправите сами или мне сделать еще один pr?
сами
fix error with AndroidManifest.xml on cordova version 7+