Android studio 2.0 新的坑!
今天,突然收到客户更新包的时候,不能运行的Bug! 我很是蛋疼,与开始查是什么问题?
java.lang.java.lang.RuntimeException: Unable to start actjava.lang.IllegalArgumentException: wrong number of arguments; expected 0, got 1
这个问题,是反射的问题,参数不正确!
我的 v1.9.3 的包是 用 Android studio 2.0 打的包! 但是V1.9.4 心的版本,发现在2.0 上有问题,所以就使用了稳定版1.4.0 版本。
于是,我怀疑是Android studio 2.0 搞鬼。我也是醉了! 我用AS 1.4.0 打了V1.9.5 版本,覆盖V1.9.4 的时候没有问题,但是覆盖V1.9.3 还是会出错!
下面是详细的error info:
java.lang.java.lang.RuntimeException: Unable to start activity ComponentInfo{c.ui.activity.WelcomeActivity}: java.lang.IllegalArgumentException: wrong number of arguments; expected 0, got 1
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2201)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:141)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:136)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5065)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: Caused by: java.lang.IllegalArgumentException: wrong number of arguments; expected 0, got 1
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.google.dexmaker.stock.ProxyBuilder.callSuper(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.eallcn.rentagent.proxy.callback.AsyncMethodAtomInterceptor.intercept(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.eallcn.rentagent.proxy.Enhancer.invoke(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at SingleControl_Proxy.setModel(SingleControl_Proxy.generated)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.eallcn.rentagent.proxyhelper.BaseAsyncHelper.a(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.eallcn.rentagent.proxyhelper.BaseAsyncHelper.a(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.eallcn.rentagent.proxyhelper.BaseAsyncHelper.onCreate(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.eallcn.rentagent.proxyhelper.ActivityHelper.onCreate(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.eallcn.rentagent.ui.activity.BaseActivity.onCreate(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.eallcn.rentagent.ui.activity.WelcomeActivity.onCreate(Unknown Source)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:5249)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2165)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2250)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread.access$800(ActivityThread.java:141)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1213)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:136)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5065)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at java.lang.reflect.Method.invokeNative(Native Method)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:515)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
12-01 16:59:57.940 29200-29200/? E/AndroidRuntime: at dalvik.system.NativeStart.main(Native Method)
Showing posts with label studio. Show all posts
Showing posts with label studio. Show all posts
Tuesday, December 1, 2015
Friday, November 27, 2015
Execution failed for task ':app:transformResourcesWithMergeJavaResForDevDebugAndroidTest'. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK META-INF/maven/
I use the Android studio 2.0 vesion to run porgram:
But have the question:
I search for long time, But have the right answer
you can get answer in the link:
https://code.google.com/p/android/issues/detail?id=192835
resolve way:
packagingOptions {
exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.properties' exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.xml'}
I think, Because the libs infomation. I find this quesiton by myself. Because I see this:
So I know. why take this question. In the Android sutdio 2.0 version. The gradle build the program, it will scan the libs, I know this. But know. it will by the pom.properties info will ckeckout pingyin4j.jar twice in the mevanCenter. So you must in the gradle
config this code: you must know in where!
packagingOptions {
exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.properties' exclude 'META-INF/maven/com.belerweb/pinyin4j/pom.xml'}
You can use gradle build this question. But when I run the program. I meet the new question:
http://stackoverflow.com/questions/33967703/unable-to-instantiate-application-com-android-tools-fd-runtime-bootstrapapplicat
Now I don't know how to reslove the new question!
But I choise a bad way to reslove the question.
I use the stable verion android studio 1.4.0
So it is resolve! So I know The question is about the Android studio 2.0 versoion! It is not stabley!
refence link:
1 https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=192835
2 https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=192835
3 http://stackoverflow.com/questions/25015539/gradle-android-optimize-packagingoptions
4 http://stackoverflow.com/questions/33967703/unable-to-instantiate-application-com-android-tools-fd-runtime-bootstrapapplicat
Labels:
Android,
AS,
studio,
Thinking,
ThinkingBug,
ThinkingProgram,
Tools
Monday, October 19, 2015
Android studio gradle is so slow?
Why?
I think, you must know every program you can see ./gradle directory. Yes it is you download the gradle info just for your current program! So when you install a new program you will find it is so slowly.
I think we can just set gradle setting for all program, you just one setting and run everywhere.
like this:
detail:
you may meet the gradle home is incrract.
you can see the url:http://stackoverflow.com/questions/21646252/how-to-set-gradle-home-while-importing-existing-project-in-android-studio
========================================
if you choise the use local gradle distribution, There is some question. because the gradle is usualy update tool. So you use local gradle, Some days later, you will find the program can build. Because the gradle version hase new plugins or new version.
you can follow this way can reslove the gradlw slowlly:
http://stackoverflow.com/questions/16775197/building-and-running-app-via-gradle-and-android-studio-is-slower-than-via-eclips
I think, you must know every program you can see ./gradle directory. Yes it is you download the gradle info just for your current program! So when you install a new program you will find it is so slowly.
I think we can just set gradle setting for all program, you just one setting and run everywhere.
like this:
detail:
you may meet the gradle home is incrract.
you can see the url:http://stackoverflow.com/questions/21646252/how-to-set-gradle-home-while-importing-existing-project-in-android-studio
========================================
if you choise the use local gradle distribution, There is some question. because the gradle is usualy update tool. So you use local gradle, Some days later, you will find the program can build. Because the gradle version hase new plugins or new version.
you can follow this way can reslove the gradlw slowlly:
http://stackoverflow.com/questions/16775197/building-and-running-app-via-gradle-and-android-studio-is-slower-than-via-eclips
Subscribe to:
Posts (Atom)



