一个Android项目,旧版Android Studio很不错.但在我更新IDE版本后,当我使用gradle构建项目时会发生异常.
这是问题所在:
错误:任务':jellyrefresh:compileReleaseJava'的执行失败.
使用java 5,6或7运行gradle时,必须使用属性retrolambda.jdk或环境变量JAVA8_HOME设置jdk8的路径
问题是,我的环境是Windows XP(我不想更新),所以我无法安装Java 8,因此无需告诉我这样做.但我仍然想使用Android Studio的最新版本.
那么这个例外的最合理解决方案是什么?
build.gradle 配置\xef\xbc\x9a
\n\napply plugin: \'com.android.application\'\napply plugin: \'realm-android\'\n//apply plugin: \'android-apt\'\n\nandroid {\n compileSdkVersion 25\n buildToolsVersion "25.0.0"\n defaultConfig {\n applicationId "com.way.event"\n minSdkVersion 21\n targetSdkVersion 25\n versionCode 1\n versionName "1.0"\n testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"\n jackOptions {\n enabled true\n }\n }\n compileOptions {\n sourceCompatibility JavaVersion.VERSION_1_8\n targetCompatibility JavaVersion.VERSION_1_8\n }\n buildTypes {\n release {\n minifyEnabled false\n proguardFiles getDefaultProguardFile(\'proguard-android.txt\'), \'proguard-rules.pro\'\n }\n }\n}\n\ndependencies {\n compile fileTree(include: [\'*.jar\'], dir: \'libs\')\n androidTestCompile(\'com.android.support.test.espresso:espresso-core:2.2.2\', {\n exclude group: \'com.android.support\', module: \'support-annotations\'\n })\n compile \'com.android.support:appcompat-v7:25.0.0\'\n compile \'com.android.support:design:25.0.0\'\n compile \'com.android.support:support-v4:25.0.0\'\n testCompile \'junit:junit:4.12\'\n}\n
Run Code Online (Sandbox Code Playgroud)\n\n它不支持 Java8\xef\xbc\x9a
\n\n\n …
当我尝试通过 PowerShell 部署项目时,PS继续执行“Enable-SPFeature”操作,然后打印以下错误消息:
Enable-SPFeature :该页面的安全验证无效。单击 Web 浏览器中的“返回”,刷新页面,然后重试操作。在 E:\Demo\DemoProject\DemoProject\scripts\utility.ps1:315 char:19 + Enable-SPFeature <<<< -identity $id -url $url -confirm:$false + CategoryInfo : InvalidData: (Microsoft.Share ...etEnableFeature:SPCmdletEnableFeature) [Enable-SPFeature], SPException + ExcellentQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletEnableFeature
谁能提供解决方案吗?
powershell sharepoint sharepoint-2007 sharepoint-2010 sharepoint-2013