Em terça-feira, 9 de dezembro de 2014 16h24min51s UTC-2, Fernando Ladeira escreveu:
Oi Rudson! Obrigado pela dica!Vou tentar no Android Studio pra ver se da certo.Sobre aquela linha, acho que ali mostra o problema, mas nao sei o que fazer para gerar a MainActivity nesse path "esquisito".Sera' que pode ser algo sobre permissões nesse path? Que path e' esse?Obrigado!12-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]]
Em terça-feira, 9 de dezembro de 2014 15h51min16s UTC-2, Rudson Lima escreveu:Fernando da uma conferida nessa linha aqui oworld/com.example.helloworld.MainActivity}: java.lang.ClassNotFoundExcepti on: Didn't find class "com.example.helloworld.MainAc tivity" on path: Cara uma dica. Se estiver usando o Eclipse para agora e corre pro Android Studio :D2014-12-09 14:46 GMT-03:00 Fernando Ladeira <nandol...@gmail.com>:--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.MainAct
ivity 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.MainAct
ivity on device emulator-5554 [2014-12-09 14:58:35 - HelloWorld] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.L
AUNCHER] cmp=com.example.helloworld/.Ma inActivity } 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.ClassNotFoundExcepti on: Didn't find class "com.example.helloworld.MainAc tivity" on path: DexPathList[[zip file "/data/app/com.example.hellowo rld-2.apk"],nativeLibraryDirec tories=[/data/app-lib/com. example.helloworld-2, /system/lib]] 12-09 12:03:39.565: E/AndroidRuntime(1566): at android.app.ActivityThread.performLaunchActivity(ActivityThr ead.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_c
ontent" android:layout_height="wrap_
content" android:layout_centerHorizon
tal="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 exte
nds Activity {@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstance
State); setContentView(R.layout.activi
ty_main );}
}
_________________<manifest xmlns:android="http:
//schemas.android.com/apk/res/ "android package="com.example.hellowo
rld" android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="
19" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_l
auncher" android:label="@string/app_n
ame" android:theme="@style/AppThe
me" > <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">Hell
oWorld</string> <string name="hello_world">H
ello world!</string> <string name="menu_settings"
> Settings</string><string name="title_
activity_main">MainActivity</s tring ></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-...@googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
--Rudson Lima ( live-O ) Desenvolvedor AndroidContato +55 85 87050560 - Fortaleza-ceGoogle Play CepLive-O e Navigation Drawer - Live-OSocial facebook | google+ | linkedin
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