Problems with simple app code

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

Problems with simple app code

Postby Guitarhero27 » Thu Feb 18, 2010 12:54 am

Hey guys, very very new here, did some reading before I came here...thought I had it....

Basically just trying to make an app that launches a website by clicking the icon...

That's it....

If i missed a tutorial somewhere, I sincerely apologize, and if I posted in the wrong section, I apologize for that as well. But any help would make me ever so grateful!

Here's my code...and the errors underneath it....that's if my code is even right...new to programming as well...please take a look and please help if possible.

package com.example.nocode;

import android.app.Activity;
import android.os.Bundle;
import android.webkit.WebView;

public class NoCodeMobile extends Activity {
@Override
public void onCreate(Bundle onSavedState){
super.onCreate(onSavedState);

WebView wb=new WebView(NoCodeMobile.this);
wb.loadUrl("http://www.nocodejam.com/mobile/mobileweb.html");
setContentView(wb);
} }

My manifest looks like this:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.nocode"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".NoCodeMobile"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>
<uses-sdk android:minSdkVersion="2" />

<uses-permission android:name="android.permission.INTERNET" />
</manifest>

My icon is in the proper folder....and here are the errors I receive:

[2010-02-17 18:41:43 - NoCode]Android Launch!
[2010-02-17 18:41:43 - NoCode]adb is running normally.
[2010-02-17 18:41:43 - NoCode]Could not find NoCode.apk!
[2010-02-17 18:43:03 - NoCode]no classfiles specified
[2010-02-17 18:43:03 - NoCode]Conversion to Dalvik format failed with error 1
[2010-02-17 18:43:03 - NoCodeAndroid]no classfiles specified
[2010-02-17 18:43:03 - NoCodeAndroid]Conversion to Dalvik format failed with error 1

I'm running Eclipse Version: 3.4.1

Again, I'm really lost at all this because I am new. The apk has to do with proper signing I believe? No idea about anything else. Any help would be extremely grateful. There's no way in heck I'd charge for this....

Thanks to everyone for your spare time, I really do appreciate it. Any pointers/tips/help would be extremely, extremely helpful to me.

Thanks again

-Seth
Guitarhero27
Freshman
Freshman
 
Posts: 3
Joined: Thu Feb 18, 2010 12:47 am

Top

Postby mrco » Thu Feb 18, 2010 11:43 am

That's really strange, look like a fail in ADT plugin. Did you try to create and run empty Android project in eclipse?
mrco
Experienced Developer
Experienced Developer
 
Posts: 71
Joined: Fri Jan 15, 2010 11:31 am
Location: 2V Software

Postby Guitarhero27 » Thu Feb 18, 2010 2:22 pm

if the ADT plugin failed I could always reinstall it and try from there, but from the looks of it, is the coding correct in the sense that it will do what I intend? click the icon - go to that website in the code?

Then if it's a matter of getting the signage/apk I think I'll be ok?

I'm a BB user, and created the same thing on their platform...never touched an android in my life, but had requests to build it, so I figured, what the hell. Just trying to figure it out piece by piece.

Thanks!

-Seth
Guitarhero27
Freshman
Freshman
 
Posts: 3
Joined: Thu Feb 18, 2010 12:47 am

Postby mitutitu » Thu Feb 18, 2010 3:58 pm

Hi Guitarhero27,

It looks like some problem lies on your project itself. But I can't still identify the prob or source of your prob with this description or logCat info. So if you could up your project here and I'll test it and can get to the root of prob quite easily.

Or you can describe the step by step procedure that you followed to create this project. Then I can tell you if something is missed.

Thanks,
mitu
Android is awesome!
User avatar
mitutitu
Senior Developer
Senior Developer
 
Posts: 113
Joined: Tue Jun 09, 2009 7:40 am
Location: St. John's, NL, Canada

Postby Guitarhero27 » Thu Feb 18, 2010 4:43 pm

mitutitu: i sent you an email if thats ok

-Seth
Guitarhero27
Freshman
Freshman
 
Posts: 3
Joined: Thu Feb 18, 2010 12:47 am

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: No registered users and 6 guests