Win a copy of Rust Web Development this week in the Other Languages forum!

Tom Mordon

Ranch Hand
+ Follow
since Apr 26, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Tom Mordon

I'm running it on a Nexus 7 device.
8 years ago
04-18 13:09:10.033: E/Google Maps Android API(8125): Failed to load map. Could not contact Google servers.
[2013-04-18 13:30:59 - google-play-services_lib] Could not find google-play-services_lib.apk!

is the link to the image that shows my google apis and android dependencies.

Snapshot of Eclipse setup

The first error I get above is from logcat the second one is from the console.

I'm confident that my package name and API number are correct. The app runs but doesn't load up the map. Any thoughts on why its not working? It looks like all my permissions are correct. I've been looking on the web and have tried numerous solutions but none of them have worked out yet. Any thoughts? Additionally I'm sure I have the google-play-services_lib.apk installed.

Thanks in advance.






8 years ago
I'm trying to get google maps v2 to work. The problem is in the main.xml file. It doesn't like line 3 in the main.xml file: xmlns:map="http://schemas.android.com/apk/res-auto" any thoughts I thought it should be fine since this is part of the node that tells it the map is ok. At a loss at this point any suggestions?

Its giving me the error message: "Unexpected namespace prefix "xmlns" found for tag fragment"




java activity file:



Manifest file:
8 years ago
I've been trying and trying but cant get it to draw an equal heart on the other side so that its a normal looking heart. Any thoughts? I've doubled checked the plot points so I think I have all of the coordinates correct. Any help would be appreciated. I think the problem stems between lines 83 to 92.

Thanks in advance.




Below is an Imgur link of what I'm currently getting in the emulator for some reason its not showing as an image tag.

Photo of mutant heart
8 years ago
I traced my code to where it was referring to in log cat, I had been up all night so having a fresh look at it later helped.
9 years ago
My project works fine on my desktop computer at home. I made a copy of the project and placed it in a holding folder, from there I imported it into my laptop workspace. The program runs fine in the emulator on the desktop but when I try to run it on the laptop if quits. Below is the LogCat info. I've been at this all night and have tried everything that I can think of and more. Any thoughts? Also this application uses some sql code to create, interact, etc, with a database table. As I said though it works fine at the source.


12-12 04:52:20.561: E/Trace(704): error opening trace file: No such file or directory (2)
12-12 04:52:21.121: E/SQLiteLog(704): (1) near "autoincrement": syntax error
12-12 04:52:21.131: D/AndroidRuntime(704): Shutting down VM
12-12 04:52:21.131: W/dalvikvm(704): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
12-12 04:52:21.141: E/AndroidRuntime(704): FATAL EXCEPTION: main
12-12 04:52:21.141: E/AndroidRuntime(704): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dwhudson.assignmnet9/com.dwhudson.assignmnet9.Assignmnet9Activity}: android.database.sqlite.SQLiteException: near "autoincrement": syntax error (code 1): , while compiling: Create Table Words (WordId integerprimary key autoincrement, Word text);
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.access$600(ActivityThread.java:130)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.os.Handler.dispatchMessage(Handler.java:99)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.os.Looper.loop(Looper.java:137)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-12 04:52:21.141: E/AndroidRuntime(704): at java.lang.reflect.Method.invokeNative(Native Method)
12-12 04:52:21.141: E/AndroidRuntime(704): at java.lang.reflect.Method.invoke(Method.java:511)
12-12 04:52:21.141: E/AndroidRuntime(704): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-12 04:52:21.141: E/AndroidRuntime(704): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-12 04:52:21.141: E/AndroidRuntime(704): at dalvik.system.NativeStart.main(Native Method)
12-12 04:52:21.141: E/AndroidRuntime(704): Caused by: android.database.sqlite.SQLiteException: near "autoincrement": syntax error (code 1): , while compiling: Create Table Words (WordId integerprimary key autoincrement, Word text);
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:882)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:493)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1663)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1594)
12-12 04:52:21.141: E/AndroidRuntime(704): at com.dwhudson.assignmnet9.DatabaseHelper.onCreate(DatabaseHelper.java:23)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:252)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:164)
12-12 04:52:21.141: E/AndroidRuntime(704): at com.dwhudson.assignmnet9.Assignmnet9Activity.onCreate(Assignmnet9Activity.java:48)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.Activity.performCreate(Activity.java:5008)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-12 04:52:21.141: E/AndroidRuntime(704): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
12-12 04:52:21.141: E/AndroidRuntime(704): ... 11 more
12-12 04:57:21.262: I/Process(704): Sending signal. PID: 704 SIG: 9
9 years ago
Ok I have that problem solved now it says there is an illegal character in the path.

12-09 15:20:35.462: D/gralloc_goldfish(671): Emulator without GPU emulation detected.
12-09 15:20:35.672: D/myDebug(671): Request failed: Illegal character in path at index 49: http://www.despoiler.net/docs/AmazonFiles/Failure to read from server!
12-09 15:20:35.732: D/myDebug(671): XML Parsing failed: null



I'm wondering what illegal characters are in the path?
9 years ago
I've been trying to find useful information for writing proper relative paths in Android but haven't found much. Do I want to do something like one of the following? Anyone know of a useful online path resource?

9 years ago
Good point, added the width & height attributes, so that's not a problem. It's still failing though pasted below is the new LogCat output: Is my path incorrect, it is supposed to be relative since I can't make the path to D: drive? Trying to get the .xml files that I need to import from the local raw folder.







12-05 20:40:32.927: D/myDebug(725): Request failed: Illegal character in path at index 0: \res\raw\filelist
12-05 20:40:32.927: D/AndroidRuntime(725): Shutting down VM
12-05 20:40:32.936: W/dalvikvm(725): threadid=1: thread exiting with uncaught exception (group=0x40a13300)
12-05 20:40:32.946: E/AndroidRuntime(725): FATAL EXCEPTION: main
12-05 20:40:32.946: E/AndroidRuntime(725): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dwhudson.http2demo/com.dwhudson.http2demo.Http2DemoActivity}: java.lang.NullPointerException
12-05 20:40:32.946: E/AndroidRuntime(725): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.app.ActivityThread.access$600(ActivityThread.java:130)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.os.Handler.dispatchMessage(Handler.java:99)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.os.Looper.loop(Looper.java:137)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-05 20:40:32.946: E/AndroidRuntime(725): at java.lang.reflect.Method.invokeNative(Native Method)
12-05 20:40:32.946: E/AndroidRuntime(725): at java.lang.reflect.Method.invoke(Method.java:511)
12-05 20:40:32.946: E/AndroidRuntime(725): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-05 20:40:32.946: E/AndroidRuntime(725): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-05 20:40:32.946: E/AndroidRuntime(725): at dalvik.system.NativeStart.main(Native Method)
12-05 20:40:32.946: E/AndroidRuntime(725): Caused by: java.lang.NullPointerException
12-05 20:40:32.946: E/AndroidRuntime(725): at java.io.StringReader.<init>(StringReader.java:47)
12-05 20:40:32.946: E/AndroidRuntime(725): at com.dwhudson.http2demo.Http2DemoActivity.getLines(Http2DemoActivity.java:180)
12-05 20:40:32.946: E/AndroidRuntime(725): at com.dwhudson.http2demo.Http2DemoActivity.onCreate(Http2DemoActivity.java:89)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.app.Activity.performCreate(Activity.java:5008)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-05 20:40:32.946: E/AndroidRuntime(725): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
12-05 20:40:32.946: E/AndroidRuntime(725): ... 11 more
9 years ago
Below is the LogCat output I have gotten so far:

12-04 21:29:50.635: E/AndroidRuntime(711): FATAL EXCEPTION: main
12-04 21:29:50.635: E/AndroidRuntime(711): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.dwhudson.http2demo/com.dwhudson.http2demo.Http2DemoActivity}: java.lang.RuntimeException: Binary XML file line #67: You must supply a layout_width attribute.
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2059)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.ActivityThread.access$600(ActivityThread.java:130)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.os.Handler.dispatchMessage(Handler.java:99)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.os.Looper.loop(Looper.java:137)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.ActivityThread.main(ActivityThread.java:4745)
12-04 21:29:50.635: E/AndroidRuntime(711): at java.lang.reflect.Method.invokeNative(Native Method)
12-04 21:29:50.635: E/AndroidRuntime(711): at java.lang.reflect.Method.invoke(Method.java:511)
12-04 21:29:50.635: E/AndroidRuntime(711): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
12-04 21:29:50.635: E/AndroidRuntime(711): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
12-04 21:29:50.635: E/AndroidRuntime(711): at dalvik.system.NativeStart.main(Native Method)
12-04 21:29:50.635: E/AndroidRuntime(711): Caused by: java.lang.RuntimeException: Binary XML file line #67: You must supply a layout_width attribute.
12-04 21:29:50.635: E/AndroidRuntime(711): at android.content.res.TypedArray.getLayoutDimension(TypedArray.java:491)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.view.ViewGroup$LayoutParams.setBaseAttributes(ViewGroup.java:5458)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.view.ViewGroup$MarginLayoutParams.<init>(ViewGroup.java:5594)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.widget.RelativeLayout$LayoutParams.<init>(RelativeLayout.java:1099)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.widget.RelativeLayout.generateLayoutParams(RelativeLayout.java:956)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.widget.RelativeLayout.generateLayoutParams(RelativeLayout.java:70)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.view.LayoutInflater.rInflate(LayoutInflater.java:748)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
12-04 21:29:50.635: E/AndroidRuntime(711): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:256)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.Activity.setContentView(Activity.java:1867)
12-04 21:29:50.635: E/AndroidRuntime(711): at com.dwhudson.http2demo.Http2DemoActivity.onCreate(Http2DemoActivity.java:76)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.Activity.performCreate(Activity.java:5008)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
12-04 21:29:50.635: E/AndroidRuntime(711): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
12-04 21:29:50.635: E/AndroidRuntime(711): ... 11 more
12-04 21:30:33.376: I/Process(711): Sending signal. PID: 711 SIG: 9
9 years ago
I'm trying to get my emulator to load the list of xml file names so that I can get the book info off the xml files located locally in the project. I'm not sure if my file class information is correct or if I have to do something with permissions in the manifest? When I start the application it says Unfortunately Http2Demo has failed to launch. Any thoughts on why it may not be able to load the names of the xml files from FileList.txt? I think the problem may lie in the class paths.













9 years ago
Figured it out, needed to use .phrase; instead of toString()
9 years ago
I've been trying to get my readFile() & createFile() methods to work and no luck so far. I'm using eclipse in Windows 7. My file path is correct so I'm not sure what's wrong with the methods. Anyone see anything that doesn't look right? For the createFile() I have do different parts and I can't seem to get either one to work. The readFile() is pretty straight forward and just has to read in the file. I have to add the parse code to it still.


createFile()



readFile()
9 years ago
When I add items from ArrayList<Item> -> to String[], an object gets passed but when I run the app in the emulator it shows the object as an address of sorts in the ListView. In the debugger it shows the cell to be null. Been stuck on this part as to why its not showing the null value that was passed from the array list to the string[]. This stems from the addItem(String sItem) method. Below is a link to image of the error.








ListActivityDemo.java


Item.java
9 years ago
Thank you, that makes sense now. Need to pay attention to imports.
9 years ago