0
嗨,大家好,我需要因爲這個錯誤對你有幫助:誤差setAlpha
這裏是logcat的:
07-30 16:12:33.823: E/AndroidRuntime(21283): java.lang.NoSuchMethodError: android.widget.LinearLayout.setAlpha
07-30 16:12:33.823: E/AndroidRuntime(21283): at it.bisemanuDEV.piano.livello1$1.onClick(livello1.java:393)
07-30 16:12:33.823: E/AndroidRuntime(21283): at android.view.View.performClick(View.java:2408)
07-30 16:12:33.823: E/AndroidRuntime(21283): at android.view.View$PerformClick.run(View.java:8819)
07-30 16:12:33.823: E/AndroidRuntime(21283): at android.os.Handler.handleCallback(Handler.java:603)
07-30 16:12:33.823: E/AndroidRuntime(21283): at android.os.Handler.dispatchMessage(Handler.java:92)
07-30 16:12:33.823: E/AndroidRuntime(21283): at android.os.Looper.loop(Looper.java:123)
07-30 16:12:33.823: E/AndroidRuntime(21283): at android.app.ActivityThread.main(ActivityThread.java:4627)
07-30 16:12:33.823: E/AndroidRuntime(21283): at java.lang.reflect.Method.invokeNative(Native Method)
07-30 16:12:33.823: E/AndroidRuntime(21283): at java.lang.reflect.Method.invoke(Method.java:521)
07-30 16:12:33.823: E/AndroidRuntime(21283): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
07-30 16:12:33.823: E/AndroidRuntime(21283): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
07-30 16:12:33.823: E/AndroidRuntime(21283): at dalvik.system.NativeStart.main(Native Method)
我認爲這可以幫助您:)(java.lang.NoSuchMethodError:android.widget.LinearLayout.setAlpha ..在又名線性佈局元素,你不能使用setAlpha) http://stackoverflow.com/questions/4813995/set-alpha-opacity-of-layout – sataniccrow 2012-07-30 14:19:56
我推薦你http://docs.oracle.com/javase/1.4。 2 /文檔/ API /爪哇/郎/ NoSuchMethodError.html。這給你一些關於爲什麼發生這個錯誤的信息。 – Vinay 2012-07-30 14:21:14
setAlpha方法僅在API編號爲11時可用。獲取最新的ADT並運行lint工具。它有很多規則來檢測這種錯誤。 – 2012-07-30 14:25:05