Android studio remove middle part from package name

前端 未结 6 505
陌清茗
陌清茗 2021-02-05 12:08

I want to remove the middle part from the package name. Ex: com.example.app to com.app

I have tried few things but not able to remove t

6条回答
  •  长情又很酷
    2021-02-05 12:51

    Android Studio indirectly (but easily) supports this requirement;
    e.g. Change java.X.Y.myPrecious to java.myPrecious [assume packages X and Y are empty]
    (a) Select Android from dropdown heading in Project window.
    (b) Using the 'gear/cog' tool uncheck Compact Empty Middle packages
    (c) Drag myPrecious to java (be patient if necessary)
    (d) Right-click/Delete X
    (e) Clean and Rebuild the project making any obvious changes to the Manifest if necessary.

提交回复
热议问题