Posts

Showing posts with the label Identifier

AWS CDK: Fixed Logical Ids

Answer : In TypeScript the method you are looking for is overrideLogicalId . But you have to get the lower level CfnVpc construct first by using the following code (TypeScript again): let vpc = new ec2.Vpc(this, 'vpc', { natGateways: 1 }) let cfnVpc = vpc.node.defaultChild as ec2.CfnVPC cfnVpc.overrideLogicalId('MainVpc') Results in the following yaml: MainVpc: Type: AWS::EC2::VPC A bit late to the party but here is my implementation. I removed the random characters at the end of the string and replaced it with the logical ID which are unique throughout the project. protected allocateLogicalId(cfnElement: CfnElement): string { return cfnElement.logicalId.split('.')[1]; }

Android: R.java: Error Expected

Answer : It sounds like you have accidentally defined a menu item in your XML with an id of =action_setting . For example: <menu> <item android:id="@+id/=action_settings" /> </menu> Remove the = from your menu XML and you should be good to go. I had the same problem, because I defined a string without name in my resources. like: <string name="">some text</string>