webmac
I hate code!
Profile
Posts: 82
Reg: Dec 18, 2012
youngstown
2,820
06/05/13 06:56 AM (10 years ago)

Having Issues with Eclipse after update

I had my android running fine until I ran an eclipse update. I also re-built my app, but kept same parameters as old with the exception of adding another Menu Button Screen. Now I have all kinds of errors and although I have Google APIs (Android 2.2) set. Most errors in src and res folders... Where do I begin???
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/05/13 07:05 AM (10 years ago)
I feel that pain! Did the same thing the other night, plus updated the sdk manager. A world of hurt! This is what happened in mine and it's bizzare.. In the res folder I had loads of elements that previously looked like this (for example): <com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" ads:adUnitId="*********" ads:adSize="SMART_BANNER" ads:loadAdOnCreate="true"/> and after the update they looked like this: <com.google.ads.AdView android:id="@+id/adView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentBottom="true" ads:adUnitId="**************" ads:adSize="SMART_BANNER" ads:loadAdOnCreate="true"/> See on the first line where the second line has moved up to the top line? So I was getting errors that the views couldn't inflate. Dropped that line back down to the second line in a TON of places, saved, did a project > clean and it's been fine since. Very strange, hope it helps!
 
webmac
I hate code!
Profile
Posts: 82
Reg: Dec 18, 2012
youngstown
2,820
like
06/05/13 07:36 AM (10 years ago)
Most errors in layout folder are: <element xmlns:tools="http://schemas.android.com/tools"> (in addition to others). When I "quick fix" an item, the file appears corrected, but Android adds another error in the console: Error in an XML file: aborting build.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/05/13 07:43 AM (10 years ago)
Ah, yes. That happened in a previous update in my set up, eclipse no longer likes a schema declaration in the elements, so it's now ok to just have (for example): <TextView ...... instead of: <TextView xmlns:android="http://schemas.android.com/apk/res/android" ...... So just remove all the "xmlns:android="http://schemas.android.com/apk/res/android" (and similar) references that are showing errors, except for the main one at the top of the file.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
06/05/13 08:06 AM (10 years ago)
yep - this is something all plugin developers with an Android plugin on the market should probably go in and fix. A lot of it is simply the copy/paste of XML files from previously established plugins to use as a starting point. Now we have a bunch of mess that Eclipse no longer likes. Easy fix - but tedious.
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/05/13 08:50 AM (10 years ago)
"a bunch of mess" haha! Good description.
 
webmac
I hate code!
Profile
Posts: 82
Reg: Dec 18, 2012
youngstown
2,820
like
06/05/13 09:25 AM (10 years ago)
OK, fixed the issues at hand...now when I run the emulator getting app closes unexpectedly on load and here is log file: 06-05 12:17:10.772: E/AndroidRuntime(310): FATAL EXCEPTION: main 06-05 12:17:10.772: E/AndroidRuntime(310): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.bmsreferralandroid/com.bmsreferralandroid.WB_screen_menuImage}: java.lang.ClassCastException: android.widget.ImageView 06-05 12:17:10.772: E/AndroidRuntime(310): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 06-05 12:17:10.772: E/AndroidRuntime(310): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 06-05 12:17:10.772: E/AndroidRuntime(310): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 06-05 12:17:10.772: E/AndroidRuntime(310): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 06-05 12:17:10.772: E/AndroidRuntime(310): at android.os.Handler.dispatchMessage(Handler.java:99) 06-05 12:17:10.772: E/AndroidRuntime(310): at android.os.Looper.loop(Looper.java:123) 06-05 12:17:10.772: E/AndroidRuntime(310): at android.app.ActivityThread.main(ActivityThread.java:4627) 06-05 12:17:10.772: E/AndroidRuntime(310): at java.lang.reflect.Method.invokeNative(Native Method) 06-05 12:17:10.772: E/AndroidRuntime(310): at java.lang.reflect.Method.invoke(Method.java:521) 06-05 12:17:10.772: E/AndroidRuntime(310): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 06-05 12:17:10.772: E/AndroidRuntime(310): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 06-05 12:17:10.772: E/AndroidRuntime(310): at dalvik.system.NativeStart.main(Native Method) 06-05 12:17:10.772: E/AndroidRuntime(310): Caused by: java.lang.ClassCastException: android.widget.ImageView 06-05 12:17:10.772: E/AndroidRuntime(310): at com.bmsreferralandroid.WB_screen_menuImage.onCreate(WB_screen_menuImage.java:207) 06-05 12:17:10.772: E/AndroidRuntime(310): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 06-05 12:17:10.772: E/AndroidRuntime(310): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 06-05 12:17:10.772: E/AndroidRuntime(310): ... 11 more
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/05/13 10:26 AM (10 years ago)
 
webmac
I hate code!
Profile
Posts: 82
Reg: Dec 18, 2012
youngstown
2,820
like
06/05/13 11:18 AM (10 years ago)
Did all that. No errors, configured for Google APIs 11 and still nothing. It takes a long time to load into the device, then it still quits unexpectedly upon load. HELP!!!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/05/13 11:23 AM (10 years ago)
You could send the project over for me to take a look if you like? paul9qr @ btinternet.com
 
webmac
I hate code!
Profile
Posts: 82
Reg: Dec 18, 2012
youngstown
2,820
like
06/05/13 02:55 PM (10 years ago)
OK. I went over all again...re-configured by adding Simple Menu plugin and it all came together. Thanks again for everyone's comments. They really helped!
 
Paul Rogers
Android Fan
Profile
Posts: 2524
Reg: May 30, 2011
UK
35,740
like
06/05/13 03:09 PM (10 years ago)
Great news!
 
webmac
I hate code!
Profile
Posts: 82
Reg: Dec 18, 2012
youngstown
2,820
like
06/06/13 07:38 AM (10 years ago)
Well, maybe I spoke too soon. App previews on 1 live device not on another. Cannot get it to preview on simulator. Have downloaded new code, with <uses-sdk android:minSdkVersion="8" android:targetSdkVersion="17" />...should this be set to something else? Also, I have debuggable set to "true", but when I make revisions on BT control panel, no revisions get sent to app.
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.