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.
Related
I try to download file using Amazon Mobile SDK Android. I created my bucket, in the permissions I set that everyone can write and read. In amazon Cognito I just left everything as default.
I get this error when try download any file from my bucket...
E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #1 E/AndroidRuntime: java.lang.RuntimeException: An error occured while executing doInBackground() E/AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:299) E/AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352) E/AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:219) E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:239) E/AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856) E/AndroidRuntime: Caused by: com.amazonaws.services.s3.model.AmazonS3Exception: Access Denied (Service: Amazon S3; Status Code: 403; Error Code: AccessDenied; Request ID: 09C37F19011C99ED), S3 Extended Request ID: NrSazbQ1KzqpB/6+YLHiE/vPt1W72zEXGF6TB5uP9vl92Apktzj8hgsz4lJKVhpDodzVMoxzO6Y= E/AndroidRuntime: at com.amazonaws.http.AmazonHttpClient.handleErrorResponse(AmazonHttpClient.java:709) E/AndroidRuntime: at com.amazonaws.http.AmazonHttpClient.executeHelper(AmazonHttpClient.java:385) E/AndroidRuntime: at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:196) E/AndroidRuntime: at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4204) E/AndroidRuntime: at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4161) E/AndroidRuntime: at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:657) E/AndroidRuntime: at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:628) E/AndroidRuntime: at com.example.admin.amazons3download.DownloadSelectionActivity$GetFileListTask.doInBackground(DownloadSelectionActivity.java:129) E/AndroidRuntime: at com.example.admin.amazons3download.DownloadSelectionActivity$GetFileListTask.doInBackground(DownloadSelectionActivity.java:113) E/AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:287) E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:234) E/AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230) E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080) E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573) E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856)
you have to include below library in gradle
compile 'com.amazonaws:aws-android-sdk-core:2.2.13'
compile 'com.amazonaws:aws-android-sdk-s3:2.2.13'
and get pool id and bucket name while creating bucket and using that information download or upload file. For more use the link https://www.numetriclabz.com/integrate-amazon-s3-to-android-tutorial/
It will help you out.
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.
I am creating an Android app. I want it to work in both orientations. When I run it in landscape mode it works well but while changing it to portrait,the app stopped. again I open it will work normally. this is my problem. when I change the orientation. First time it shows error. help me to solve this issue.
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: java.lang.RuntimeException: An error occured while executing doInBackground()
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at android.os.AsyncTask$3.done(AsyncTask.java:299)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:352)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.util.concurrent.FutureTask.setException(FutureTask.java:219)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:239)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: Caused by: java.lang.OutOfMemoryError
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at android.graphics.BitmapFactory.nativeDecodeStream(Native Method)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:529)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at android.graphics.BitmapFactory.decodeFile(BitmapFactory.java:302)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at com.infizoom.smartselfie2.Helper.decodeSampledBitmapFromPath(Helper.java:32)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at com.infizoom.smartselfie2.FrameActivity.LoadImagesFromLocalDb(FrameActivity.java:195)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at com.infizoom.smartselfie2.FrameActivity$LoadImagesIntoLocal.doInBackground(FrameActivity.java:136)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at com.infizoom.smartselfie2.FrameActivity$LoadImagesIntoLocal.doInBackground(FrameActivity.java:114)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at android.os.AsyncTask$2.call(AsyncTask.java:287)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.util.concurrent.FutureTask.run(FutureTask.java:234)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1080)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:573)
11-05 16:40:44.010 10204-10250/com.infizoom.smartselfie2 E/AndroidRuntime: at java.lang.Thread.run(Thread.java:856)
You are getting an OutOfMemory exception when your activity gets recreated after orientation change.
I could guess in your FrameActivity you are leaking bitmaps on every activity creation not allowing the GC to free up enough memory.
i have try to set the dropdown color for the autocomplete text view it works fine in all other api but when ever i run it with the nexus 5 marshmallows i got the following error
my log cat is
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: FATAL EXCEPTION: main
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: Process: test.text.com, PID: 29058
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.graphics.drawable.Drawable android.support.v7.internal.widget.TintManager.getDrawable(int)' on a null object reference
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.support.v7.widget.AppCompatAutoCompleteTextView.setDropDownBackgroundResource(AppCompatAutoCompleteTextView.java:96)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at test.text.com.activity.CreateRideActivity.onWindowFocusChanged(CreateRideActivity.java:369)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.support.v7.internal.view.WindowCallbackWrapper.onWindowFocusChanged(WindowCallbackWrapper.java:114)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.support.v7.internal.view.WindowCallbackWrapper.onWindowFocusChanged(WindowCallbackWrapper.java:114)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at com.android.internal.policy.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:3237)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.view.View.dispatchWindowFocusChanged(View.java:9528)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:1200)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:3378)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-02 17:36:23.815 29058-29058/test.text.com E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
My code is
AutoSuggestView.setDropDownBackgroundResource(R.drawable.bg_rectangle_white_curve_border_right);
Try to update your appcompat libraries. In the current (23.1.1) version of appcompat-v7 the code in AppCompatAutoCompleteTextView was changed to resolve this like so
public void setDropDownBackgroundResource(#DrawableRes int resId) {
if (mTintManager != null) {
setDropDownBackgroundDrawable(mTintManager.getDrawable(resId));
} else {
super.setDropDownBackgroundResource(resId);
}
}
I'm working on a application where the database is imported like in this tutorial: http://www.reigndesign.com/blog/using-your-own-sqlite-database-in-android-applications/
This works fine on most devices,only at HTC Sensation XL it doesn't work.
Thanks for your Help
Here is error code
11-02 21:35:33.748: W/System.err(14878): java.lang.IllegalStateException: getReadableDatabase called recursively
11-02 21:35:33.748: W/System.err(14878): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:245)
11-02 21:35:33.748: W/System.err(14878): at at.klettern.database.DatabaseHelper.createDataBase(DatabaseHelper.java:54)
11-02 21:35:33.748: W/System.err(14878): at at.klettern.database.DatabaseHelper.onCreate(DatabaseHelper.java:148)
11-02 21:35:33.758: W/System.err(14878): at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:183)
11-02 21:35:33.758: W/System.err(14878): at android.database.sqlite.SQLiteOpenHelper.getReadableDatabase(SQLiteOpenHelper.java:249)
11-02 21:35:33.758: W/System.err(14878): at at.klettern.database.DatabaseRouten.(DatabaseRouten.java:39)
11-02 21:35:33.758: W/System.err(14878): at at.klettern.wachauclimbing.SplashActivity.onCreate(SplashActivity.java:28)
11-02 21:35:33.758: W/System.err(14878): at android.app.Activity.performCreate(Activity.java:4531)
11-02 21:35:33.768: W/System.err(14878): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1071)
11-02 21:35:33.768: W/System.err(14878): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2150)
11-02 21:35:33.768: W/System.err(14878): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2229)
11-02 21:35:33.768: W/System.err(14878): at android.app.ActivityThread.access$600(ActivityThread.java:139)
11-02 21:35:33.768: W/System.err(14878): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1261)
11-02 21:35:33.778: W/System.err(14878): at android.os.Handler.dispatchMessage(Handler.java:99)
11-02 21:35:33.778: W/System.err(14878): at android.os.Looper.loop(Looper.java:154)
11-02 21:35:33.778: W/System.err(14878): at android.app.ActivityThread.main(ActivityThread.java:4945)
11-02 21:35:33.778: W/System.err(14878): at java.lang.reflect.Method.invokeNative(Native Method)
11-02 21:35:33.778: W/System.err(14878): at java.lang.reflect.Method.invoke(Method.java:511)
11-02 21:35:33.788: W/System.err(14878): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
11-02 21:35:33.788: W/System.err(14878): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
11-02 21:35:33.788: W/System.err(14878): at dalvik.system.NativeStart.main(Native Method)
What android version are running on this device? [I found some fatal errors Android 2.1 or less.]
Otherwise, I have been able to cannibalize most if not all of the tutorial you reference and it works flawlessly from 2.2 and up.