我在Nexus服务器的自己的存储库中部署工件时遇到错误:"无法部署工件:无法传输工件""无法传输文件http:/// my_artifact.返回代码为:400"
我让Nexus运行了一个自定义存储库my_repo和下一个maven本地配置:
的settings.xml
<server>
<id>my_repo</id>
<username>user</username>
<password>pass</password>
</server>
...
<mirror>
<id>my_repo</id>
<name>Repo Mirror</name>
<url><my_url_to_my_repo></url>
<mirrorOf>*</mirrorOf>
</mirror>
Run Code Online (Sandbox Code Playgroud)
的pom.xml
<distributionManagement>
<repository>
<id>my_repo</id>
<name>my_repo</name>
<url><my_url_to_my_repo></url>
<layout>default</layout>
</repository>
<snapshotRepository>
<id>snapshots</id>
<name>Snapshots</name>
<url><my_url_to_my_snapshot_repo></url>
</snapshotRepository>
</distributionManagement>
Run Code Online (Sandbox Code Playgroud)
然后我执行
mvn deploy
Run Code Online (Sandbox Code Playgroud)
并得到错误.任何的想法?
我用android.speech.SpeechRecognizer它DICTATION_MODE来识别很长一段时间内的命令.在此模式下,对回调方法的调用onPartialResults比正常模式下的延迟要多得多.有谁知道为什么会发生这种情况以及如何避免这种延迟?
这是我用于的配置SpeechRecognizer:
Intent recognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);
recognizerIntent.putExtra("calling_package", mainActivity.getApplicationContext().getPackageName());
recognizerIntent.putExtra("android.speech.extra.DICTATION_MODE", true);
recognizerIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true);
recognizerIntent.putExtra(RecognizerIntent.EXTRA_MAX_RESULTS, 100);
Run Code Online (Sandbox Code Playgroud) 我正在使用Cordova CLI(v6.0.0)为Android制作应用程序,我无法加载插件:cordova-plugin-file和cordova-plugin-dialogs.我知道它,因为显示下一个警报:
if (!navigator.notification)
alert("Plugin notification not working properly!");
if (!window.requestFileSystem)
alert("Plugin file not working properly!");
Run Code Online (Sandbox Code Playgroud)
单击按钮后(而不是ondeviceready事件之前)使用插件.已安装插件:
cordova-plugin-file v.1.2.0
cordova plugin add cordova-plugin-file
Run Code Online (Sandbox Code Playgroud)
cordova-plugin-dialogs v4.1.0
cordova plugin add cordova-plugin-dialogs
Run Code Online (Sandbox Code Playgroud)
我还在config.xml中添加了下一行
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
Run Code Online (Sandbox Code Playgroud)
我做错了什么?
在阅读了一些相关的帖子后,我已经知道在尝试通过id将一个元素发现到Activity-View-Hierarchy之前,我必须显式调用setContenView.我创建了一个带有膨胀视图的Activity,一切正常.问题是当我尝试使用下一个xml和代码为此活动设置另一个视图时:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="0dp"
android:paddingRight="0dp"
android:paddingTop="0dp"
android:paddingBottom="0dp"
android:background="#B12A6D"
tools:context=".MainActivity"
android:orientation="vertical"
>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="top"
android:background="@drawable/bg_purple_500"
android:layout_margin="0dp"
>
<GridLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/GridLayout1"
android:layout_width="wrap_content"
android:layout_height="0dp"
android:layout_weight="50"
android:columnCount="4"
android:rowCount="4"
android:orientation="horizontal"
tools:context=".GridXMLActivity"
android:layout_gravity="center_horizontal"
android:layout_marginTop="10dp"
>
<ImageView
android:id="@+id/my_bnt"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon_new_game"
android:contentDescription="@string/text"
android:layout_marginTop="10dp"
android:layout_marginLeft="20dp"
android:layout_marginRight="20dp"
android:layout_marginBottom="10dp"
/>
</GridLayout>
</LinearLayout>
</RelativeLayout>
Run Code Online (Sandbox Code Playgroud)
码:
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
....
protected void method_triggered_from_UI_thread() {
// Inflate other layout...
View view = View.inflate(this, …Run Code Online (Sandbox Code Playgroud)