Blank activity not getting created using New->Android Activity Wizard

前端 未结 4 1502
情话喂你
情话喂你 2020-12-17 01:47

I had recently updated my Android SDK from 22.3 to 22.6. After updating, i tried creating a Blank Activity using the wizard. I am unable to create one as i

4条回答
  •  再見小時候
    2020-12-17 02:16

    I have not suffer this problem with 22.6 but with 23. In my case, the problem seems to be the free maker sintax of the .flt files of the template.

    Just in case this could be useful to others, I've solved this issue changing two files:

    $ANDROID_SDK/tools/templates/activities/BlankActivity/recipe.xml.ftl original:

    
    
        <#if appCompat>
        ...
    

    I've added ?has_content after <#if appCompat in line 4:

    
    
        <#if appCompat?has_content>
        ...
    

    The other file is $ANDROID_SDK/tools/templates/activities/BlankActivity/root/res/menu/main.xml.ftl. The original version starts with:

    
    ...
    

    I've added the same string at the end:

    
    ...
    

    The same errors exist in many other activities templates...

    Keep in mind that these changes will be overwriten with the next SDK update... I hope Google solve this issue, because developping for Android with Eclipse is becoming a headache.

提交回复
热议问题