Overload resolution ambiguity (anko)
Overload resolution ambiguity:ほげほげ
というerrorが出る
引数が一致している(全く同じ関数)が出てきて選びようがないじゃないかぁ!
結論...原因は
compile 'org.jetbrains.anko:anko-sdk15:0.9'
compile 'org.jetbrains.anko:anko-sdk19:0.8.3'
versionの違うanko-sdkが2つあったからだった
15:0.9を消したらerrorが消えた。
ImageViewのidがerrorになる.
override fun onCreateView(inflater: LayoutInflater?, container: ViewGroup?, savedInstanceState: Bundle?): View? {
return UI {
relativeLayout {
verticalLayout {
imageView{
setImageResource(R.drawable.kan_0)//here
padding = dip(10)
}
}
}
}.view
}
まあ上のところを
R.drawable.kan_0
ではなく、
android.R.drawable.kan_0
にしたらkan_0が認識されなかった.
何故か?たぶん私が思ってたところと違うと場所のdrawableを引っ張てきてたんだと思う.
import com.example.hunachi.${PACKAGE_NAME}.R
をimportしようなって話でした.
Plugin version (1.1.3-2) is not the same as library version (jre8-1.1.3-2)
build errorした。原因は多分、
Plugin version (1.1.3-2) is not the same as library version (jre8-1.1.3-2)
というerrorみたいだった。
これの
buildscript {
repositories {
...
// You need to add the following repository to download the
// new plugin.
maven {
url 'https://maven.google.com'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.0-alpha1'
}
}
加えたら治った。kotlin関係のバグなのか私がやばいことしたのか・・・?
初心者なのでわからない。
もしわかる方いたら教えてください。