Rendering problems while implementing Facebook - android

I am trying to implement facebook login into my app seeingn this link
I am seeing lots of Rendering problems and some Exception in my xml file.
This is my xml
fragment_main.xml
<LinearLayout 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" android:paddingLeft="#dimen/activity_horizontal_margin"
android:paddingRight="#dimen/activity_horizontal_margin"
android:orientation="vertical"
android:paddingTop="#dimen/activity_vertical_margin"
android:paddingBottom="#dimen/activity_vertical_margin" tools:context=".MainActivityFragment">
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="New Text"
android:id="#+id/textView"
android:layout_centerHorizontal="true"/>
<com.facebook.login.widget.LoginButton
android:id="#+id/login_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
</LinearLayout>
The error is as below
Rendering Problems The following classes could not be found:
The following classes could not be instantiated :
- android.support.v7.internal.app.WindowDecorActionBar (Fix Build Path, Create Class)
Tip: Try to build the project. The following classes could not be instantiated:
The following classes could not be instantiated :
- com.facebook.login.widget.LoginButton (Open Class, Show Exception, Clear Cache)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE
Exception Details java.lang.NoClassDefFoundError: Could not initialize class com.facebook.login.widget.LoginButton   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)   at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)   at android.view.LayoutInflater.rInflate_Original(LayoutInflater.java:835)   at android.view.LayoutInflater_Delegate.rInflate(LayoutInflater_Delegate.java:70)   at android.view.LayoutInflater.rInflate(LayoutInflater.java:811)   at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)   at android.view.LayoutInflater.inflate(LayoutInflater.java:515)   at android.view.LayoutInflater.inflate(LayoutInflater.java:394)
What is this Rendering problem???
Whenever i start any project i'll end up with this Rendering Problem
In this app, when i run the project, app crashes with the follwoing log file
LOG FILE
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: Process: app.first.sinduja.fbfrnd, PID: 7027
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:309)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:223)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:242)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Object.hashCode()' on a null object reference
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:772)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.ConcurrentHashMap.containsKey(ConcurrentHashMap.java:800)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at com.facebook.internal.Utility.queryAppSettings(Utility.java:802)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at com.facebook.login.widget.LoginButton$1.doInBackground(LoginButton.java:502)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at com.facebook.login.widget.LoginButton$1.doInBackground(LoginButton.java:499)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:295)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) 
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) 
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) 
12-05 18:41:34.207 7027-7075/app.first.sinduja.fbfrnd E/AndroidRuntime: at java.lang.Thread.run(Thread.java:818) 
Please help me with this project, thanks in advance.

Related

java.lang.RuntimeException: An error occured while executing doInBackground() Kotlin

I was trying to access my MS Database Locally so i have this DatabaseHelper.kt file which i included the Doinbackground Function, which in turn brings out this error.
CodeSnippet
06-19 15:28:45.082 18819-18819/? E/Zygote: MountEmulatedStorage() 06-19 15:28:45.082 18819-18819/? E/Zygote: v2 06-19 15:28:45.092 18819-18819/? E/SELinux: [DEBUG] get_category: variable seinfo: default sensitivity: NULL, cateogry: NULL 06-19 15:28:45.092 18819-18819/? E/art: setrlimit(RLIMIT_CORE) failed for pid 18819: Operation not permitted 06-19 15:28:47.814 18819-18819/com.example.mysqlcon E/RecyclerView: No adapter attached; skipping layout 06-19 15:28:47.924 18819-18819/com.example.mysqlcon E/RecyclerView: No adapter attached; skipping layout 06-19 15:28:47.984 18819-18862/com.example.mysqlcon E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1
Process: com.example.mysqlcon, PID: 18819 java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lorg/ietf/jgss/GSSManager; at net.sourceforge.jtds.jdbc.TdsCore.createGssToken(TdsCore.java:4400) at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1971) at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:617) at net.sourceforge.jtds.jdbc.JtdsConnection.(JtdsConnection.java:371) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) at java.sql.DriverManager.getConnection(DriverManager.java:179) at java.sql.DriverManager.getConnection(DriverManager.java:144) at com.example.mysqlcon.ConnectionClass.dbConn(ConnectionClass.kt:26) at com.example.mysqlcon.DatabaseHelper$SyncData.doInBackground(DatabaseHelper.kt:36) at com.example.mysqlcon.DatabaseHelper$SyncData.doInBackground(DatabaseHelper.kt:23) at android.os.AsyncTask$2.call(AsyncTask.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.ietf.jgss.GSSManager" on path: DexPathList[[zip file "/data/app/com.example.mysqlcon-1/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.ClassLoader.loadClass(ClassLoader.java:511) at java.lang.ClassLoader.loadClass(ClassLoader.java:469) at net.sourceforge.jtds.jdbc.TdsCore.createGssToken(TdsCore.java:4400) at net.sourceforge.jtds.jdbc.TdsCore.sendMSLoginPkt(TdsCore.java:1971) at net.sourceforge.jtds.jdbc.TdsCore.login(TdsCore.java:617) at net.sourceforge.jtds.jdbc.JtdsConnection.(JtdsConnection.java:371) at net.sourceforge.jtds.jdbc.Driver.connect(Driver.java:184) at java.sql.DriverManager.getConnection(DriverManager.java:179) at java.sql.DriverManager.getConnection(DriverManager.java:144) at com.example.mysqlcon.ConnectionClass.dbConn(ConnectionClass.kt:26) at com.example.mysqlcon.DatabaseHelper$SyncData.doInBackground(DatabaseHelper.kt:36) at com.example.mysqlcon.DatabaseHelper$SyncData.doInBackground(DatabaseHelper.kt:23) at android.os.AsyncTask$2.call(AsyncTask.java:292) at java.util.concurrent.FutureTask.run(FutureTask.java:237) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:818) Suppressed: java.lang.ClassNotFoundException: org.ietf.jgss.GSSManager at java.lang.Class.classForName(Native Method) at java.lang.BootClassLoader.findClass(ClassLoader.java:781) at java.lang.BootClassLoader.loadClass(ClassLoader.java:841) at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
... 17 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available 06-19 15:28:48.064 18819-18819/com.example.mysqlcon E/WindowManager: android.view.WindowLeaked: Activity com.example.mysqlcon.InvoiceActivity has leaked window com.android.internal.policy.impl.PhoneWindow$DecorView{11c938 V.E..... R......D 0,0-681,215} that was originally added here at android.view.ViewRootImpl.(ViewRootImpl.java:530) at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:287) at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:91) at android.app.Dialog.show(Dialog.java:325) at android.app.ProgressDialog.show(ProgressDialog.java:151) at android.app.ProgressDialog.show(ProgressDialog.java:134) at com.example.mysqlcon.DatabaseHelper$SyncData.onPreExecute(DatabaseHelper.kt:31) at android.os.AsyncTask.executeOnExecutor(AsyncTask.java:591) at android.os.AsyncTask.execute(AsyncTask.java:539) at com.example.mysqlcon.DatabaseHelper.getinvoices(DatabaseHelper.kt:92) at com.example.mysqlcon.InvoiceActivity.onCreate(InvoiceActivity.kt:21) at android.app.Activity.performCreate(Activity.java:6609) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1134) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3104) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3261) at android.app.ActivityThread.access$1000(ActivityThread.java:219) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1735) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:145) at android.app.ActivityThread.main(ActivityThread.java:6939) at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
You have this:
java.lang.Thread.run(Thread.java:818) Caused by:
java.lang.NoClassDefFoundError: Failed resolution of:
Lorg/ietf/jgss/GSSManager; at
Either you are using an incorrect proguard specification or this class is not available because a dependency is missing.

Error Loading Static Fragment and a FrameLayout (

I'm trying to load layout with a static fragment and a LinearLayout using this Layout:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:orientation="horizontal" android:layout_width="match_parent"
android:layout_height="match_parent"
android:baselineAligned="false"
android:divider="?android:attr/dividerHorizontal"
tools:context="com.eldad.yossi.popularmovs.MainActivity">
<fragment
android:id="#+id/main_fragment"
android:name="com.eldad.yossi.popularmovs.MainActivityFragment"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="2"
tools:layout="#android:layout/list_content" />
<FrameLayout
android:id="#+id/movies_detail_container"
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="4" />
</LinearLayout>
But when the app is launched I get this error:
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: FATAL EXCEPTION: ModernAsyncTask #2
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: Process: com.eldad.yossi.popularmovs, PID: 13809
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ModernAsyncTask$3.done(ModernAsyncTask.java:142)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:242)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.lang.Thread.run(Thread.java:818)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1437)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.content.ContentResolver.query(ContentResolver.java:462)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ContentResolverCompatJellybean.query(ContentResolverCompatJellybean.java:29)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ContentResolverCompat$ContentResolverCompatImplJB.query(ContentResolverCompat.java:57)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ContentResolverCompat.query(ContentResolverCompat.java:125)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.CursorLoader.loadInBackground(CursorLoader.java:59)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.CursorLoader.loadInBackground(CursorLoader.java:37)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.AsyncTaskLoader.onLoadInBackground(AsyncTaskLoader.java:296)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:54)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.AsyncTaskLoader$LoadTask.doInBackground(AsyncTaskLoader.java:42)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at android.support.v4.content.ModernAsyncTask$2.call(ModernAsyncTask.java:128)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) 
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) 
11-02 23:02:36.418 13809-13880/com.eldad.yossi.popularmovs E/AndroidRuntime: at java.lang.Thread.run(Thread.java:818) 
The same Activity and fragments work when I'm loading them using a layout that contain only the fragment.
any ideas?
The full code is in a GitHub repo - https://github.com/yossildad/PopularMovs
Thanks.
From the stack trace I could see you are trying to get an URI from a null reference in the doInBackground() method in activity com.eldad.yossi.popularmovs.MainActivity .
Ok, I've found the bug. I was using a not initialized uri when creating the Loader
inside the fragment.
Thanks for your help and sorry for the trouble.
Your problem is not in the fragment declaration. According to the stacktrace, look into the doInBackground method of your ModernASyncTask which you are extends on.
java.lang.RuntimeException: An error occurred while executing doInBackground() - probably you may have null reference on a context object, i guess.

Facebook and proguard

I'm trying to integrate Facebook into my app and whenever the app starts, I get the following error:
com.facebook.as: com.facebook.c.f got an unexpected method signature: public abstract org.json.JSONObject com.facebook.c.c.c() at com.facebook.c.h.a(Unknown Source) at com.facebook.c.f.b(Unknown Source) at com.facebook.c.f.invoke(Unknown Source) at $Proxy0.c(Native Method) at com.facebook.b.bo.a(Unknown Source) at com.facebook.b.bo.onPostExecute(Unknown Source) at android.os.AsyncTask.finish(AsyncTask.java:632) at android.os.AsyncTask.access$600(AsyncTask.java:177) at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:136) at android.app.ActivityThread.main(ActivityThread.java:5118) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:794) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:610) at dalvik.system.NativeStart.main(Native Method) java.lang.RuntimeException: An error occured while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:300) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355) at java.util.concurrent.FutureTask.setException(FutureTask.java:222) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587) at java.lang.Thread.run(Thread.java:841) Caused by: com.facebook.as: com.facebook.c.f got an unexpected method signature: public abstract org.json.JSONObject com.facebook.c.c.c() at com.facebook.c.h.a(Unknown Source) at com.facebook.c.f.b(Unknown Source) at com.facebook.c.f.invoke(Unknown Source) at $Proxy0.c(Native Method) at com.facebook.b.bn.a(Unknown Source) at com.facebook.widget.c.a(Unknown Source) at com.facebook.widget.c.doInBackground(Unknown Source) at android.os.AsyncTask$2.call(AsyncTask.java:288) at java.util.concurrent.FutureTask.run(FutureTask.java:237) ... 4 more
Reading on the internet made me realize that it relates to proguard so I added the following to proguard-project.txt as instructed:
-keep class com.facebook.** { *; }
-keepattributes Signature
but the same happens... what am I missing?

ParseLoginSampleBasic giving exception when I push the Log In button on the first screen (Android)

I just started developing with parse. I downloaded the android ParseLoginUI and the sample apps. Two things I had done to be able to start the app: for ParseLoginUI add a reference to the FacebookSDK and copy the "bolts-android-1.1.2.jar" file from the FacebookSDK libs folder to the ParseLoginUI lib folder.
The ParseLoginSampleBasic runs, the first screen comes up, but when I click on the Log in button , this exception comes up:
12-05 12:02:31.151: E/dalvikvm(24615): Could not find class 'com.parse.ui.ParseLoginActivity', referenced from method com.parse.ui.ParseLoginBuilder.build
12-05 12:02:32.606: E/AndroidRuntime(24615): FATAL EXCEPTION: main
12-05 12:02:32.606: E/AndroidRuntime(24615): Process: com.parse.loginsample.basic, PID: 24615
12-05 12:02:32.606: E/AndroidRuntime(24615): java.lang.NoClassDefFoundError: com.parse.ui.ParseLoginActivity
12-05 12:02:32.606: E/AndroidRuntime(24615): at com.parse.ui.ParseLoginBuilder.build(ParseLoginBuilder.java:309)
12-05 12:02:32.606: E/AndroidRuntime(24615): at com.parse.loginsample.basic.SampleProfileActivity$1.onClick(SampleProfileActivity.java:71)
12-05 12:02:32.606: E/AndroidRuntime(24615): at android.view.View.performClick(View.java:4456)
12-05 12:02:32.606: E/AndroidRuntime(24615): at android.view.View$PerformClick.run(View.java:18482)
12-05 12:02:32.606: E/AndroidRuntime(24615): at android.os.Handler.handleCallback(Handler.java:733)
12-05 12:02:32.606: E/AndroidRuntime(24615): at android.os.Handler.dispatchMessage(Handler.java:95)
12-05 12:02:32.606: E/AndroidRuntime(24615): at android.os.Looper.loop(Looper.java:136)
12-05 12:02:32.606: E/AndroidRuntime(24615): at android.app.ActivityThread.main(ActivityThread.java:5097)
12-05 12:02:32.606: E/AndroidRuntime(24615): at java.lang.reflect.Method.invokeNative(Native Method)
12-05 12:02:32.606: E/AndroidRuntime(24615): at java.lang.reflect.Method.invoke(Method.java:515)
12-05 12:02:32.606: E/AndroidRuntime(24615): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
12-05 12:02:32.606: E/AndroidRuntime(24615): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
12-05 12:02:32.606: E/AndroidRuntime(24615): at dalvik.system.NativeStart.main(Native Method)

Why does my map won't work?

Hi :) I have some problem including google maps in my android application. Ive been trying everything including extending MapActivity and adding this line to my project manifest <uses-library android:name="com.google.android.maps" /> . I still get the same errors.
Here is the logcat's output.
12-05 00:03:23.472: E/AndroidRuntime(24182): FATAL EXCEPTION: main
12-05 00:03:23.472: E/AndroidRuntime(24182): Process: com.example.package, PID: 24182
12-05 00:03:23.472: E/AndroidRuntime(24182): java.lang.RuntimeException: Unable to start activity ComponentInfo{...map.Map}: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.android.gms.maps.MapView
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2298)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2360)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.ActivityThread.access$800(ActivityThread.java:144)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.os.Handler.dispatchMessage(Handler.java:102)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.os.Looper.loop(Looper.java:135)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.ActivityThread.main(ActivityThread.java:5221)
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.reflect.Method.invoke(Native Method)
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.reflect.Method.invoke(Method.java:372)
12-05 00:03:23.472: E/AndroidRuntime(24182): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
12-05 00:03:23.472: E/AndroidRuntime(24182): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
12-05 00:03:23.472: E/AndroidRuntime(24182): Caused by: android.view.InflateException: Binary XML file line #8: Error inflating class com.google.android.gms.maps.MapView
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.view.LayoutInflater.createView(LayoutInflater.java:633)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:743)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.view.LayoutInflater.inflate(LayoutInflater.java:504)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.view.LayoutInflater.inflate(LayoutInflater.java:414)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.view.LayoutInflater.inflate(LayoutInflater.java:365)
12-05 00:03:23.472: E/AndroidRuntime(24182): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:377)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.Activity.setContentView(Activity.java:2144)
12-05 00:03:23.472: E/AndroidRuntime(24182): at ...map.Map.onCreate(Map.java:28)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.Activity.performCreate(Activity.java:5933)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1105)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2251)
12-05 00:03:23.472: E/AndroidRuntime(24182): ... 10 more
12-05 00:03:23.472: E/AndroidRuntime(24182): Caused by: java.lang.reflect.InvocationTargetException
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.reflect.Constructor.newInstance(Native Method)
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.reflect.Constructor.newInstance(Constructor.java:288)
12-05 00:03:23.472: E/AndroidRuntime(24182): at android.view.LayoutInflater.createView(LayoutInflater.java:607)
12-05 00:03:23.472: E/AndroidRuntime(24182): ... 21 more
12-05 00:03:23.472: E/AndroidRuntime(24182): Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$styleable;
12-05 00:03:23.472: E/AndroidRuntime(24182): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source)
12-05 00:03:23.472: E/AndroidRuntime(24182): at com.google.android.gms.maps.MapView.<init>(Unknown Source)
12-05 00:03:23.472: E/AndroidRuntime(24182): ... 24 more
12-05 00:03:23.472: E/AndroidRuntime(24182): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.google.android.gms.R$styleable" on path: DexPathList[[zip file "/system/framework/com.google.android.maps.jar", zip file "/data/app/.../base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]
12-05 00:03:23.472: E/AndroidRuntime(24182): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
12-05 00:03:23.472: E/AndroidRuntime(24182): ... 26 more
12-05 00:03:23.472: E/AndroidRuntime(24182): Suppressed: java.lang.ClassNotFoundException: com.google.android.gms.R$styleable
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.Class.classForName(Native Method)
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
12-05 00:03:23.472: E/AndroidRuntime(24182): at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
12-05 00:03:23.472: E/AndroidRuntime(24182): ... 27 more
12-05 00:03:23.472: E/AndroidRuntime(24182): Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
12-05 00:03:25.050: I/Process(24182): Sending signal. PID: 24182 SIG: 9
Here's the only code I have so far
public class Map extends MapActivity {
MapView map_view;
GoogleMap map;
#Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.layout_map);
MapsInitializer.initialize(this);
map_view = (MapView) findViewById(R.id.map_view);
map_view.onCreate(savedInstanceState);
map = map_view.getMap();
map.setMapType(GoogleMap.MAP_TYPE_SATELLITE);
The code seems to crash at this line : setContentView(R.layout.layout_map);
Thanks !

Categories

Resources