小编Wol*_*lvy的帖子

无法解决:com.android.support.constraint:constraint-layout:1.1.0-beta1

这是错误:

Error:(23, 13) Failed to resolve: com.android.support.constraint:constraint-
layout:1.1.0-beta1
Upgrade plugin to version 2.3.3 and sync project
Show in File
Show in Project Structure dialog
Run Code Online (Sandbox Code Playgroud)

当我点击升级插件时,没有任何反应.我不知道如何解决这个问题.我尝试添加存储库maven谷歌,但它不起作用.

这是应用代码:

apply plugin: 'com.android.application'

android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
    applicationId "com.google.googleio"
    minSdkVersion 22
    targetSdkVersion 25
    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.constraint:constraint-layout:1.1.0-beta1'
}
Run Code Online (Sandbox Code Playgroud)

java android android-gradle-plugin android-constraintlayout

4
推荐指数
1
解决办法
7468
查看次数

java中非整数值的阶乘

5!= 5*4*3*2*1.

我对此没有任何问题.但我注意到我的程序,如果我输入说3.5!它会返回一个定义的数字.

你怎么计算它们?

我的程序中有这样的东西

 public class fact {
   public static void main(String args[]) {
     double factorial=1;
     System.out.println("Type a number");
     double number= sc.nextDouble(); /*I am using scanner*/
     while (number !=0 ){
       factorial = factorial * number;
       number--;
     }
     System.out.println(factorial);
   }
 }
Run Code Online (Sandbox Code Playgroud)

java factorial

0
推荐指数
1
解决办法
542
查看次数