我正在尝试从我的Mac 上运行基于ubuntu:15.10的容器.
我运行以下命令
docker run -i -v /tmp/.X11-unix:/tmp/. -e DISPLAY=192.168.0.104:0 --privileged mycompany/mycontainer
Run Code Online (Sandbox Code Playgroud)
(IP取自我的en0:inet使用ifconfig)
我收到以下错误:
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request: BadValue (integer parameter out of range for operation)
Major opcode of failed request: 149 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Value in failed request: 0x0
Serial number of failed request: 25
Current serial number in output stream: 26
Run Code Online (Sandbox Code Playgroud)
此容器在另一个团队成员Ubuntu OS上运行,没有任何问题.
是什么原因造成了这个错误?
我正在使用tail -f/dev/null命令来保持容器.
该行本身放在一个前后有回声的脚本中.尾部-f/dev/null下的echo 预计是无法访问的,但出于某种原因我在日志中看到它.
一旦出现问题,每次重启容器都会导致容器启动并完成.只有rm和rebuild解决了这个问题.
我不确定它是否已连接,但我注意到在很短的时间内停止和启动计算机的一个问题帮助我重现了这个问题.
在什么情况下tail -f/dev/null可以继续下一行?
基本映像: ubuntu 64x,14.0.4
计算机操作系统: ubuntu 64x,14.0.4
我有一个包含两个 textView 和一个 ImageView 的布局。
第一个文本左对齐。第二个文本也向左对齐,位于第一个文本的下方。图像向右对齐!并与第一个文本的顶部和第二个文本的底部对齐。
我尝试使用相对布局来完成这项工作,但图像拒绝向右对齐。
这是我的 xml
<RelativeLayout
android:id="@+id/NameAndPhoto"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
<LinearLayout
android:id="@+id/Names"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical" >
<TextView
android:id="@+id/FirstName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/contact_page_name_text_style" >
</TextView>
<TextView
android:id="@+id/LastName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="@style/contact_page_name_text_style" >
</TextView>
</LinearLayout>
<ImageView
android:id="@+id/PersonPhoto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@id/Names"
android:layout_alignParentRight="true"
android:layout_alignTop="@id/Names"
android:layout_toRightOf="@id/Names"
android:contentDescription="@string/contact_page_photo_content_description"
android:padding="3sp"
android:scaleType="fitCenter" >
</ImageView>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
请指教。
谢谢,伊卡。
使用android(23)上的最新版本与com.android.support:appcompat-v7:23.0.1和com.android.support:design:23.0.1
我收到以下错误
错误:(20,118)找不到与给定名称匹配的资源('drawable'与值'@ drawable/abc_list_selector_disabled_holo_dark').
在stackoverflow中的类似情况下,我看到版本号之间的不匹配,如下例所示
我的Gradle文件如下所示:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "a.b.c.d.defg"
minSdkVersion 7
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
}
}
Run Code Online (Sandbox Code Playgroud)