Cannot read packageName from AndroidManifest.xml

前端 未结 14 1163
情歌与酒
情歌与酒 2020-12-15 19:52

I have errors in my android manifest file:

Error:Cannot read packageName from C:\\Users\\brandon\\AndroidStudioProjects\\MineDodge2\\app\\src\\main\\AndroidM         


        
14条回答
  •  暖寄归人
    2020-12-15 20:18

    I got this error on Unity 2018 and i think it's a bug.

    Fix for me: Add packagename to Android Manifest in Unity project.

    In my project path to manifest: Assets/Plugins/Android/AndroidManifest.xml

    For example i got error when my Manifest file looks like this:

    
    
    ...
    
    

    It generated by Oculus Gear VR plugin by Unity. But it missed package name and must looks like this:

    
    
    ...
    
    

    Replace YOURPACKAGENAME to Package Name of your project. It should be in Edit -> Project Settings -> Player -> Other Settings -> Identification -> Package Name and should looks like com.YOURORGANIZATION.APPNAME

    Some peoples wrote, that manifest must looks like this:

    
    
    ...
    
    

    And they wrote that Unity will replace ${applicationId} on package name when build android application, but in my Unity 2018.1.6f1 it doesn't work and i think it's a bug too.

提交回复
热议问题