bradmartin / nativescript-wear-os

Consolidated repo for WearOS with NativeScript
Apache License 2.0
35 stars 7 forks source link

NativeScript 7 The new package uses a shared library that is not available #20

Open bufke opened 3 years ago

bufke commented 3 years ago

Problem

On a new NativeScript project, nativescript-wear-os produces the error Unable to apply changes on device: emulator-5554. Error is: The new package uses a shared library that is not available..

Reproduction steps

or clone https://gitlab.com/bufke/nativescript-wear-os-7-bug

Note that it's not necessary to actually use nativescript-wear-os. Just adding it causes builds to fail. It may be missing com.github.bradmartin:SmartWearOs but I couldn't find a work around.

Erudition commented 3 years ago

Same issue here, wish I knew about this before upgrading nativescript. To add details: I can still deploy to wear os. But I'm trying to get my app to run on phones as well, and going back to phones is when I see this error.

Erudition commented 3 years ago

Workaround: dig into this package (in your node-modules folder - will get overridden unfortunately) and find include.gradle. https://github.com/bradmartin/nativescript-wear-os/blob/a90fb427d9bc6421b8f613d095bfbad75b0a1ffb/src/platforms/android/include.gradle#L10 change that from implementation to compileOnly.

Now it builds again!

As a side effect this allowed me to depend on com.google.android.gms:play-services-wearable:17.1.0 in my app, when the previous configuration forced me to use 17.0.0.