自上次更新(从6月25日开始构建)以来,Android Studio Gradle中的任何更改都非常缓慢.当您编辑文件并在keyup上重新编译时,它似乎也会自动跟踪更改.
我的i5每次更改都需要几分钟.
知道如何加快我的Gradle变化吗?
我是ninject的完全新手
我一直在拉开其他人的代码,发现了几个nInject模块实例 - 从Ninject.Modules.Module派生的类,并且有一个包含大部分代码的加载方法.
通过调用StandardKernel实例的LoadModule方法并将其传递给模块类的实例来调用这些类.
也许我在这里遗漏了一些明显的东西,但是这对于创建一个普通的旧类并调用它的方法,或者使用静态方法的静态类有什么好处呢?
从http://www.cplusplus.com/reference/utility/pair/,我们知道std::pair有两个成员变量,first和second.
为什么STL设计者决定公开两个成员变量,first而second不是提供a getFirst()和a getSecond()?
在某个try块中,我有两个String变量可能导致NumberFormatException我用户Integer.parseInt(string1) 和Integer.parseInt(string2).问题是,如果我catch是一个例外,如何知道哪个字符串是麻烦制造者?我需要得到麻烦制造者的变量名称.
这是一些示例代码:
public class test {
public static void main(String[] args) {
try {
String string1 = "fdsa";
String string2 = "fbbbb";
Integer.parseInt(string1);
Integer.parseInt(string2);
} catch (NumberFormatException e) {
e.printStackTrace();
}
}
}
Run Code Online (Sandbox Code Playgroud)
并且该方法e.printStackTrace()没有告诉我变量名称; 它只是告诉我麻烦制造者的内容.
java.lang.NumberFormatException:对于java.lang.Integer中java.lang.Integer.parseInt(Integer.java:580)的java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)中的输入字符串:"fdsa". parseInt(Integer.java:615)at the test.main(test.java:9)at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)at sun.reflect .delegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)at java.lang.reflect.Method.invoke(Method.java:498)at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
进程以退出代码0结束
我需要知道变量名称的原因是我需要提示用户发生了什么.例如,通过使用告诉用户string1是错误的
System.out.println(troubleMakerName + "is wrong!")
Run Code Online (Sandbox Code Playgroud)
在我的要求中,用户应该输入
fd=(fileName,maxLength,minLength)
Run Code Online (Sandbox Code Playgroud)
然后我将分析输入字符串并创建一些响应.所以,我想检查是否maxLength与minLength将抛出NumberFormatException.在这种情况下,如果minLength有问题,那么我需要提示用户minLength是错误的.
示例代码:
<EditText
android:id="@+id/msg_type"
android:layout_width="0dp"
android:layout_height="40dp"
android:layout_marginBottom="8dp"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:hint="Input message"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_bias="0.75"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/btn_chat_send"
tools:layout_constraintBottom_creator="1"
tools:layout_constraintLeft_creator="1"
tools:layout_constraintRight_creator="1"/>
Run Code Online (Sandbox Code Playgroud)
是什么tools:layout_constraintRight_creator="1"在这里做?没有任何文件解释这些事情.
谷歌搜索后我找不到任何答案.我是Maven世界的新手.
另外,我想知道当我点击"构建项目"时,Intellij IDEA会对我的Maven项目做些什么?Intellij如何使用Maven构建项目?
例如,我在一个应用程序中有一些活动,为了查看特定活动的UI或其他任何内容,我需要运行某个不是应用程序启动器的活动.
一种愚蠢的方法是在发射器中为该活动建立一个"门",并从门进入活动内部.但是,有没有更好的办法单独运行某项活动?
我在Windows 10上安装了Python 2.7和Python 3.5.我在当前的PyCharm项目中使用python 2.7,项目的python解释器设置为python 2.7.现在我打开PyCharm设置,我想更新我的pthon of python 2.7.
点数版本是8.1.1,我点击了更新,期望它更新到最新版本.但是,在暗示"更新成功"之后,我注意到pip的版本仍然是8.1.1.然后我意识到PyCharm可以在Windows命令行中使用我的默认pip版本 - 这是python3.5的pip.
如何解决这个问题呢?这是一个错误吗?