当我做了一个make时如何找到这个错误的问题我有这个错误信息:错误:(9,5)错误:资源android:attr/colorError not found
奇怪的是我有2个build.gradle文件:这里是我的build.gradle(Project:Projectname)文件:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)
在这里我的build.gradle(模块:app)文件:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
defaultConfig {
applicationId "org.acme.nfcedit"
minSdkVersion 22
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release { …Run Code Online (Sandbox Code Playgroud) 我是openstack热文件的新手.我做了搜索,但没有找到我的问题的相关答案.这里我的模板加热yaml文件:
heat_template_version: newton
description: Simple template to deploy a single compute instance with an attached volume
resources:
my_instance:
type: OS::Nova::Server
properties:
name: instance-name
flavor: std.cpu1ram1
block_device_mapping_v2:
- device_name: vda
image: RHEL-7.4
volume_size: 30
delete_on_termination: true
networks:
- network: network-name.admin-network
security_group:
- security_group: [security-name.group-sec-default]
my_volume:
type: OS::Cinder::Volume
properties:
size: 10
my_attachment:
type: OS::Cinder::VolumeAttachment
properties:
instance_uuid: { get_resource: my_instance }
volume_id: { get_resource: my_volume }
mountpoint: /dev/vdb
Run Code Online (Sandbox Code Playgroud)
这个加热文件有效,但我不知道如何将浮动IP附加到"my_instance".我能够在Horizon内部完成它并且它在没有PB的情况下工作.在Horizon界面下,我选择"Router_dmz"作为创建并允许浮动IP的池.据我所知,浮动IP地址应与"network-name.admin-network"相关联.我读了很多文档,我不知道是否要使用操作系统:Neutron :: FloatingIPAssociation资源或OS :: Nova :: FloatingIPAssociation.我试过了,我没有问题.
我有一个 5000 行的文件,我想要几个每个 200 行的文件,我尝试了以下方法:
#!/usr/bin/perl
use strict;
use warnings;
my $targetfile = '200_lines.txt';
my $filename = '5000_lines.txt';
open ( my $DATA, '<', $filename ) or die "Could not open file '$filename': $!";
while ( my $line = <$DATA> ) {
my $counter++;
open (my $FILE, '>>', $targetfile ) or die "Could not open file '$targetfile': $!";
print $FILE $line;
close $FILE;
if ( $counter % 200 == 0
if ($. % 200 == 0) {
$targetfile =~ s/200/$counter/;
} …Run Code Online (Sandbox Code Playgroud)