I just updated to the latest Android SDK Tools, r12.
Now compiling of my current project fails by
UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException:
already added: Lorg/anddev/andengine/audio/BaseAudioEntity;
<= The library is definitely added only once - so this must be a compiling problem.
It also fails finding some standard android themes:
...\res\values\styles.xml:4: error: Error retrieving parent for item:
No resource found that matches the given name
'#android:style/TextAppearance.Holo.Inverse'.
The paths to the SDK and other included libraries are correct.
Anyone with same issues?
Thank you!
OK I got the compiling issue fixed - this happened because I included an external library (AndEngine) which sources already were existent in the /out folder. After clearing the folder's contents the project compiled correctly.
"UNEXPECTED TOP-LEVEL EXCEPTION: java.lang.IllegalArgumentException: already added: Lorg/anddev/andengine/audio/BaseAudioEntity;"
Most probably there are AndEngine and some extension jars build so, that extension include classes of andengine. To resolve this issue -> exclude andengine src during rebuilding extensions (uncheck folder in export window).
Related
I created a Xamarin.Android project and after I set the configuration:
- Dex compiler: D8
- Code Shrinker: R8
- Linking: Sdk Assembleies Only
I am presented with this error:
Program type already present: android.support.annotation.PluralsRes
I also have the LinkerPleaseInclude file.
I have to say that I am in Debug configuration.
I solved this issue by clearing cache for Nuget Packages.
I know I'm a bit late but since the answer for this matter did not work for me, here is how I solved it:
First of all, it's obviously a NuGet packages problem, so I searched in my .nuget folder at C:\Users{yourUser}.nuget\packages and looked inside some of the folders, in my case the Android support libraries folders, and saw that there were folders for many versions of that library excetp for the one I was referencing in my project wich was 28.0.0.3, the last version at this moment, the newest I had in the folder was for 28.0.0.1 so instead un uninstalling and installing everything again I just modified the android.csproj, changed the referenced versions for the support libraries for 28.0.0.1 and then it gave another error, I just literally downgraded some other libraries to 28.0.0.1 from Visual Studio NuGet package manager and then everything worked fine.
Have a nice one. It took weeks for me of trying to find out.
Neither of the above solutions worked for me. I encountered the error opening an Xamarin project that was created in VS 2015 on VS 2019. I changed the "Compile using android version" in the manifest to Android 9.0, updated the NuGet packages, but this error remained. I also attempted the tried-and-true deleting ".vs", "bin" and "obj" folders.
What finally got rid of the "Program type already present: android.support.annotation.PluralsRes" error was deleting everything in the "Packages" folder for the project. My understanding is that directory was eliminated in VS 2017, but suppose because the original project was VS 2015 it was still being utilized and causing the conflict.
I was getting
Program type already present: androidx.appcompat.content.res.AppCompatResources$ColorStateListCacheEntry error.
I had 2 references
a)Xamarin.AndroidX.Appcompat and
b)Xmarin.Androidx.appcompat.content.res.AppCompatResources
I removed the reference Xmarin.Androidx.appcompat.content.res.AppCompatResources
And now the project builds without errors
I have an Android project, consisting of multiple modules. I do not use Gradle.
With Android 2.2.3 the project worked well, but I updated my Android Studio to 2.3.
When I loaded the main project, I got this message:
Update Property Files
The structure of following Android modules was changed:
ActionbarSherlock
I checked my repository to see what has changed in the main project, and in in my project config, I found the following.
These line were removed:
# This file is automatically generated by IntelliJ IDEA
# Project target.
target=android-16
android.library.reference.1=../ActionbarSherlock
android.library.reference.2=../WizarDroid
And this line is added:
# This file is automatically generated by IntelliJ IDEA
# Project target.
target=android-16
project.type=0
In the module dependencies, I still can see the module, yet I get compile errors:
D:\MainProject\res\values\styles.xml:51: error: Error retrieving parent for item: No resource found that matches the given name 'Theme.Sherlock.Light'.
D:\MainProject\res\values\styles.xml:53: error: Error: No resource found that matches the given name: attr 'actionBarTabStyle'.
What can I do about that?
UPDATE:
I could not make it work with 2.3, so I reverted back to 2.2.3.
Now, when my project is compiled and run, it crashes with the following errors:
java.lang.ClassCastException: android.widget.TextView cannot be cast to android.widget.Button
On the message dialog, it shows a completely different text instead of the OK text. It really messed up my project...
I had to revert back to 2.2.3 and add the modules again.
I guess, in 2.3 only Gradle is safe...
hope someone knows better.
Since hours I try to include the cardslib - https://github.com/gabrielemariotti/cardslib, unfortunately without success.
When I want to including as it's described in the https://github.com/gabrielemariotti/cardslib/blob/master/doc/BUILD.md#reference-this-project-as-a-library-in-eclipse.
When I want to load the lib into the workspace the Error "An internal error occurred during: "Adjusting Android Project Classpath".
Source attachment path 'C:\Users\User\android-sdks\sources\android-14' for IClasspathEntry must be absolute" appears.
I never had such an error before. What causes it?
After pressing "OK" the lib gets into the workspace and "cardslib] Using 1.7 requires compiling with Android 4.4 (KitKat); currently using API 14" is shown on the console. So the lib is marked with an error.
After getting through the document (mark as lib etc. in properties) I still get some errors:
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files
BuildConfig.java /cardslib/gen/it/gmariotti/cardslib/library/cards line 1 Java Problem
error: Error retrieving parent for item: No resource found that matches the given name 'card.native'.
styles.xml /cardslib/res/values line 23 Android AAPT Problem
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project cardslib Unknown Java Problem
I asked google about it already but didn't find a match so I hope someone can help me out.
Thanks in advance.
In my app, I have to have two version: Full and Lite.
I am following these tutorials:
http://bitowl.wordpress.com/2011/07/06/tutorial-how-to-make-full-and-lite-versions/
http://blog.donnfelker.com/2010/08/05/howto-android-full-and-lite-versions/
So, I build my full version, and make it a library. This full version uses some other libs, needed to some components.
Then, I create a new project and added the lib created. The problem is when I try to run my lite version, eclipse gives this error:
[2012-12-13 13:58:13 - <app> Lite] Dx
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.IllegalArgumentException: already added: Lnet/simonvt/timepicker/R$attr;
Conversion to Dalvik format failed with error 1
The simonvt/timepicker is one of the libs that I use in my full version.
How can I fix this?
Thank you!
Do the following:
Right-click on your project and choose Build Path -> Configure Build Path,
then go to order and export section
If simonvt/timepicker has a checkmark against it, then deselect it.
I believe that the problem is that the library project is already added and you might be trying to add it again.
I've been trying to install the C2dm module for titanium studio found here: https://github.com/Kuraturpa/titanium-c2dm
I keep having issues. When I set it up as outlined here: http://developer.appcelerator.com/question/38451/c2dm-in-titanium
I keep getting an error that it can't find the module (at runtime). The error reads:
Location: [357, 0] /tmp/module.js Message: Error: Requested module not
found: com.findlaw.titanium.cd2m (/tmp/module.js#357)
I indeed can't find this file anywhere in my stuff, because I don't have a tmp folder in my project. I originally put the xml code from that above forum post in the timodule.xml file and it got me to this runtime error. When I switch it to the tiapp.xml file I get this error:
[ERROR] The 'apiversion' for 'com.findlaw.titanium.c2dm' in the module
manifest is not a valid value. Please use a version of the module that
has an 'apiversion' value of 2 or greater set in it's manifest file
When I try to manually build the module myself using ant, I get:
BUILD FAILED /Users/sammy/Downloads/IGx89-titanium-c2dm-3b05b8a
2/build.xml:9: Cannot find /Library/Application
Support/Titanium/mobilesdk/osx/1.8.0.1/module/android/build.xml
imported from /Users/sammy/Downloads/IGx89-titanium-c2dm-3b05b8a
2/build.xml
I checked, and the build.xml file is in the folder shown in the error. I'm kind of at a loss as to what to do here...
That module does not support the version of Titanium Mobile you are using (1.8.0.1 or higher). You must either update it yourself, or find another C2DM module.
The guide for porting to 1.8.0.1 is available here:
http://docs.appcelerator.com/titanium/2.0/index.html#!/guide/Android_Module_Porting_Guide_for_1.8.0.1