Android Wear app not installing through handset

后端 未结 8 1871
南旧
南旧 2020-11-29 07:42

I\'m trying to get a wearable app installed through an Android handset using the \'Package with Android Studio method\' found here but it\'s not working. The apk is never in

8条回答
  •  栀梦
    栀梦 (楼主)
    2020-11-29 08:12

    I had ussue with wear product flavors. I had flavors in both handheld and wear apps. To solve my issue I used next code in build.gradle handheld app file:

    freeWearApp project(path: ':wear', configuration: 'wearfreeRelease')
    fullWearApp project(path: ':wear', configuration: 'wearfullRelease')
    

    where, free and full are flavors from handheld module, wearfree and wearfull are flavors from wear mudule, Release is name of wear module buildtype.

    And don't forget publishNonDefault true in the android block of the wear gradle.

提交回复
热议问题