--Oi pessoal!Procurei muito antes de postar, mas nao consegui resolver esse problema.Estou começando a programar para Android.Fiz um hello world básico.No windows funciona perfeito, mas no macbook não.Parece que esta' tudo ok, chega a aparecer a aplicação e exibir o hello world, mas logo e' encerrada assim: "Unfortunately, HelloWorld has stopped".Desculpa vir com duvidas básicas, mas não encontrei um solução para o meu caso.Muito obrigado. FernandoNo console aparece isso :[2014-12-09 14:58:30 - HelloWorld] Android Launch![2014-12-09 14:58:30 - HelloWorld] adb is running normally.
[2014-12-09 14:58:30 - HelloWorld] Performing com.example.helloworld.MainActivity activity launch
[2014-12-09 14:58:30 - HelloWorld] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'Dev3'
[2014-12-09 14:58:33 - HelloWorld] Application already deployed. No need to reinstall.
[2014-12-09 14:58:33 - HelloWorld] Starting activity com.example.helloworld.MainActivity on device emulator-5554
[2014-12-09 14:58:35 - HelloWorld] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.helloworld/.MainActivity }
e no logcat uma coisa que me chamou atenção foi isso:12-09 12:03:39.435: I/Choreographer(388): Skipped 55 frames! The application may be doing too much work on its main thread.12-09 12:03:39.545: D/AndroidRuntime(1566): Shutting down VM12-09 12:03:39.545: W/dalvikvm(1566): threadid=1: thread exiting with uncaught exception (group=0xb2a57ba8)12-09 12:03:39.565: E/AndroidRuntime(1566): FATAL EXCEPTION: main12-09 12:03:39.565: E/AndroidRuntime(1566): Process: com.example.helloworld, PID: 156612-09 12:03:39.565: E/AndroidRuntime(1566): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.helloworld/com.example.helloworld.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.helloworld.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.helloworld-2.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.helloworld-2, /system/lib]]12-09 12:03:39.565: E/AndroidRuntime(1566): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2121)activity_main.xml<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="@string/hello_world"
tools:context=".MainActivity" />
</RelativeLayout>
__________________________
package com.example;
import com.example.helloworld.R;
import android.app.Activity;
import android.os.Bundle;
public class MainActivity extends Activity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
_________________<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.helloworld"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
</application>
</manifest>
___________________<resources>
<string name="app_name">HelloWorld</string>
<string name="hello_world">Hello world!</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_main">MainActivity</string>
</resources>
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "Android Brasil - Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to androidbrasil-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.






0 comentários:
Postar um comentário