Can we create multi dex support builds in Titanium android? - android

I have been developing an application in Titanium android.Somehow after updating titanium i started getting the 65k limit error and the solution i got is :
https://www.contentful.com/blog/2014/10/30/android-and-the-dex-64k-methods-limit/
But how to implement these in Titanium ?

this question was asked and an issue was created in 2014: https://jira.appcelerator.org/browse/TIMOB-18082
however, it is not resolved. (Under Titanium SDK 5.1.1.GA)
I met this problem today, and my solution is:
remove the unnecessary jar files!
Those jar files was referred by some java class, has huge methods ( more than 1k) but it will not be used at run time, so removing them will not cause app crash nor throw exceptions.
This is not an final solution, but kinda of trick. whatever, it works for me.

Related

Problems porting Android App from VS2019 to VS2022

I am trying to upgrade an Android App to build under VS2022 and use the latest nuget packages. I am also trying to modify it so that it will work on phones, and not just tablets, so the display needs to scale properly. (This is an old project that started with VS2010, so there are many legacy problems.)
When I build it, I get the error message:
resource dimen/abc_action_bar_icon_vertical_padding_material not found.
The offending axml code is:
android:textSize="#dimen/abc_action_bar_icon_vertical_padding_material"
I know that this comes from the depreciation of R.dimen and that I should upgrade from the support library to AndroidX. I thought that I had done this.
My question is, How do I fix this? Should I add or delete packages? If I declare the value explicitly, what should I use? This happens in many files, so I want to make sure that it is fixed correctly.
I also get the message:
attribute menu not found
from the code:
app:menu="#menu/navigation_menu"
I assume this is a related problem.
Thanks,
Dan

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__aeabi_memmove4"

I've used NDK cross compiled many different version of library and used them in my Android application. They just work fine, until final release of my app, my fellow worker have tested the application on his XiaoMi 4 and this error appeared.
First I thought it maybe because of some particular platform's library's lost, but soon after I extract the .apk file and find everything was actually there.
I have searched for google found nothing that can solve the problem.
PS: In my new version of application, I just changed few lines in my C library and all of them is just about if-else-return stuff. I'd never used any of those memcpy-memmove functions, let alone memmove4.
If anyone can explain this to me? what is __aeaib_memmove4 ?
So I finally solved the problem by upgrading the APP-PLATFORM in my Android.mk file from 8 to 17, which is my targetSDKversion, so the error is gone.

Multi dex eclipse android

when i tried to run it shows error as below,can anyone tell me how to configure multidex in eclipse
Dx
trouble writing output: Too many field references: 83958;
max is 65536.
You may try using --multi-dex option.
References by package:
2 android.graphics
582 android.support.v7.appcompat
83374
Possible duplicate: Android multidex support library using eclipse
It looks like ADT's ant-tasks project is no longer maintained (it resides under 'legacy' folder).
So if you can't migrate to Gradle, you can edit the DexExecTask manually. You'll have of course to rebuild the project locally..
[Edit - 10/25/2014] maven-android-plugin does support multi-dex. However, it currently has a small issue: secondary dex files placed in wrong location. This pull request strives to fix that, so stay tuned! (Fixed in 4.0.0)
I would suggest migrating to Android Studio.
If you are using Android services, just import the one you really need...In this way you can save lots of refences and stay under 65k avoiding the error.
Otherwise you need to use multidex-support
Download the library:
https://developer.android.com/tools/support-library/features.html#multidex
And then add it to your project as described in the link.
Hope you can solve quickly your problem

Android Annotations and MonkeyTalk?

I just tried to update my project which uses Android Annotations to include the MonkeyTalk agent. However, as soon as I switch the project to an AspectJ project, all my Android Annotations references are not recognized.
Has anybody successfully used MonkeyTalk in an Android Annotations project?
I'm using Eclipse 4.2 SR2.
It looks like this issue has been raised on the Android Annotations FAQ:
https://github.com/excilys/androidannotations/wiki/FAQ#wiki-aspectj
In order to "fix" it, you have to remove / replace some project properties. I'm worried doing this will cause MonkeyTalk to not work, but I haven't tried it yet.
Any insight appreciated!
I was facing to this problem before. I added a solution in the FAQ page of AA. Could you test that and keep me updated ?
I had implemented the solution but still my android annotations references are not recognized,please let me know if there is any other way to tackle the same.

Android app with library can't find the library.apk

I'm trying to get the FinchVideo example from the Programming Android book to work. It uses the FinchWelcome library. I've set up FinchWelcome as a Library and in the FinchVideo application I have checked the FinchWelcome library in Properties -> Android. When I try to run FinchVideo in the emulator it complains that it cannot find FinchWelcome.apk (output below). I'm building for Android 4.0.3.
While Googling for this problem I've found that a lot of people have this problem with Android apps that use libraries. No one seems to have found a solution that works consistently, though. None of the Android books I've seen even talk about how to download libraries.
What is the proper way to handle libraries in Android applications? Is this a bug in the Eclipse ADT?
Thanks.
[FinchVideo] Installing FinchVideo.apk...
[FinchVideo] Success!
[FinchWelcome] Could not find FinchWelcome.apk!
[FinchVideo] Starting activity com.oreilly.demo.pa.finchvideo.FinchVideoActivity on device emulator-5554
Not sure if you have struggled on the same corner yet for me the solution is to add the library in the Android Properties of you project rather than as project in the Java Properties ...
I am also getting this error ( lets better call it confusing/weird message ) every now and then - my Workaround: just ignore it for now and wait for a new ADT version
And yes - imho this is a bug in ADT - Android is really nice, but ADT needs a lot of more attention for sure ..-)
I got the FitchVideo app. installed on the emulator. When I run it it crashes immediately with
D/AndroidRuntime(505): Shutting down VM
W/dalvikvm(505): threadid=1: thread exiting with uncaught exception (group=0x409c01f8)
E/AndroidRuntime(505): FATAL EXCEPTION: main
Nothing in the rest of the stack trace refers to the Fitch source (app. or lib.).
I can't tell if that is a problem with the way that ADT installed the app. and lib on the emulator or if it is some other problem.
I don't think I'm going to spend much more time with the code from the Programming Android book.
I solved the problem.
In your FinchVideo project you will need to add the reference to FinchWelcome as a jar-file library reference rather that a project library reference.
Hope this helps.

Categories

Resources