我有这个gradle错误.
错误:(9,0)未找到Gradle DSL方法:'compile()'
我试过引用类似的问题,但它没有用.
Android gradle build错误:(9,0)未找到Gradle DSL方法:'compile()'.
在同步Build.Gradle时出现错误"未找到Gradle DSL方法:'compile()'"
发现不支持的Gradle DSL方法:'compile()'!
我的build.gradle代码在这里
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
compile 'com.android.support:appcompat-v7:20.+'
compile 'com.google.android.gms:play-services:6.5.+'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
Run Code Online (Sandbox Code Playgroud)
build.gradle(Module.app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.1"
defaultConfig {
applicationId "com.example.simplemaker.pushtest"
minSdkVersion 9
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes …Run Code Online (Sandbox Code Playgroud) I'm reading a lot of zip file with rubyzip.
However this error message is always showing in only specific file even it is zip file.
/app/vendor/bundle/ruby/2.3.0/gems/rubyzip-1.2.1/lib/zip/central_directory.rb:143:in `get_e_o_c_d': Zip end of central directory signature not found (Zip::Error)
I guess this error occures in rubyzip.
How can I manage this error?
Here is my code.
url = 'http://example.zip'
zipfilename = open(url)
Zip::File.open(zipfilename, :allow_redirections => :all) do |zip_file|
entry = zip_file.glob("*ixbrl.htm").first
stream = entry.get_input_stream.read
puts stream
end
Run Code Online (Sandbox Code Playgroud)
Thank you!
我正在尝试在Swift中使用CTCallCenter,但它始终显示错误.
我想它可能导致如何使用闭包但实际上我并不熟悉它.
有人有想法解决这个问题吗?
这是我的代码
import CoreTelephony
class ViewController: UIViewController{
var callCenter:CTCallCenter = CTCallCenter()
override func viewDidLoad() {
callCenter.callEventHandler(call:CTCall) -> Void in{
//will get CTcall status here
}
}
}
Run Code Online (Sandbox Code Playgroud)
有三个错误.
1,Braced语句块是未使用的闭包
2,预期表达
3,一行上的连续陈述必须用";"分隔.
我试图改变,但任何方式都不正确.
提前致谢!