I create a new library with Android Studio. And now I want to use it with Eclipse (because some people use Eclipse for them applications.).
I have tested my jar file from the library in a android project and it's running fine.
But when I want to use it with Eclipse I have some errors :
03-26 14:25:59.442: W/System.err(31062): at
com.mylib.MyLib.access$000(MyLib.java:24)
03-26 14:25:59.442: W/System.err(31062): at
com.mylib.MyLib$2.run(MyLib.java:114)
I don't understand why I don't have no problem with Android Studio and these ones with Eclipse?
After some hours of search, I have found an error in the console log :
java.lang.IllegalStateException: A required meta-data tag in your
app's AndroidManifest.xml does not exist. You must have the following
declaration within the element:
I have followed the indications and is working fine now.
Maybe the other problems are due to this one.
Thanks for the help.
Related
Basically I am developing an android app. Icreated a new library project and generated the aar file. Next in my main project I imported the aar file, added dependecy in my main project app module. Everything is fine till this point.
I wanted to use an activity instance of the aar library into my main project. So I added
<uses-library android:name="com.mylibray.project" android:required="true" />
in the main android manifest.
While installing it in android device/emulator getting INSTALL_FAILED_MISSING_SHARED_LIBRARY error. How to solve this?
I have solved this problem by using Google APIS/Intel Atom x86 as CPU in the emulator, without Google APIS I always get that error you said. ;)
I'm still trying to use ARCore for a native Android app in another IDE (Visual Studio) instead of Android Studio. That's why I need to "DIY" numbers of things (like manually add ARCore dependency in my APK package). So far I made some progress but still the AR session creation fails.
First, it gives me the following error message:
System.err: java.lang.RuntimeException: Application manifest must
contain meta-data com.google.ar.core.min_apk_version System.err: at
com.google.ar.core.SessionCreateJniHelper.getMinApkVersion(SessionCreateJniHelper.java:62)
third_party/arcore/ar/core/android/sdk/session_create.cc: Calling
getMinApkVersion failed.
I followed the suggestions given in the message and add the following line in AndroidManifest.xml:
<meta-data android:name="com.google.ar.core.min_apk_version" android:value="24"/>
After doing this, the first error is solved, but it gives a new error:
[blaze-out/android-armeabi-v7a-opt/genfiles/third_party/arcore/ar/core/android/arcore_c_shim_function_impls.inc:375]
CHECK failed: expression='"false"' Failed to call function:
ArSession_createImplementation, this function version: 171127000 is
higher than requested min apk version
I can not get rid of this error. Anyone know the reason about it? What's meaning of the function's version is higher than requested min apk version?
Found answer myself:
ArCore 1.1 requires the following meta-data must be in the app's AndroidManifest.xml. See the AndroidManifest.xml in the ARCore's aar package.
<meta-data android:name="com.google.ar.core.min_apk_version" android:value="180226000" />
Android studio will merge this meta-data into the final app's ANdroidManifest.xml but Visual Studio does not do any manifest merging. So the solution is manually add it into the manifest.
ARSession is now successfully created.
It took me about 2 days to make ArCore works with Visual Studio (at least AR session is now created). I'd like to share my experience about how to "DIY" to add ARCore in a native Android app in the IDE other than Android Studio:
You need to download ARCore 1.1.0 from maven repository, search it out then click "aar" link so you can download the full package. Alternatively, you can build sample app "hello_ar_c" by Android Studio and then find the aar package in gralde cache directory: "[user dir].gradle\caches\transforms-1\files-1.1\core-1.1.0.aar".
Manage to make ARCore shared library (libarcore_sdk_c.so) packed into your app's APK file under "/lib".
Manage to make ARCore java library (classes.jar) packed into your app's APK file by DEX tools.
Enable ARCore for your app in AndroidManifext.xml by following ARCore guide
Manually add the meta-data "min_apk_version" in AndroidManifest.xml
The step 5 is the most tricky part since ARCore guide does not mentioned this and Android Studio silently add it after merging the manifest.
Hope ArCore team could provide some guide line of using ARCore with other IDEs.
I'm trying to run Vuforia SDK samples from here on Android:
I have already downloaded the main SDK and put those sample files in the sample folder. I have added the Vuforia.jar as a library and dependency to my project. The app runs on my Samsung S4 and shows the Menu but when I click Start on any of the examples it sends me back to the main menu rather than opening the camera. It doesn't show any crash error in the logs.
I'm wondering if anyone has experienced this problem and has managed to fix it?
I had the same issue and when looked at the log it had this message com.vuforia.samples.VuforiaSamples W/System.err: The library libVuforia.so could not be loaded
Then I followed the answer here https://developer.vuforia.com/forum/android/crash-start-button-sample
and that .jar file to the project. This solved the above issue.
Also I had to generate a license key for the app and set it in the last parameter in Vuforia.setInitParameters(mActivity, mVuforiaFlags, "") in the SampleApplicationSession class
try it:
add the Vuforia.jar lib in your project;
go to archive build.gradle (Module:app) and check if the variable 'VUFORIA_SDK_DIR' is correct (in my project it had the value "../../../" but i had to change to "../../"), the path has to lead to your Vuforia SDK dir;
finally, change the method Vuforia.setInitParameters in the archive SampleApplicationSession.java (line: 414), add your vuforia key in the third paramether;
it works to me
I am using parse-1.9.3.jar file in my eclipse tool for android development, but i am facing the noclassdeffoundexception while am running my app and my app is crashed. How to fix this issue, i am very much struggle in this point.
I followed some points
I download the parse-1.9.3.jar, copy and paste in lib folder then right click on that parse-1.9.3.jar file then i clicked add to build, this way is not working
Right click project--> project properties--> order and export tab --> checked android private libraries and parse-1.9.3.jar file, this way not worked
java.lang.NoClassDefFoundError: com.parse.Parse --> no use
Libraries do not get added to APK anymore after upgrade to ADT 22 --> NO use
NoClassDefFoundError with parse -->no use
https://en.wikipedia.org/wiki/Classpath_%28Java%29 this is also no use
Please help for how to fix this error and run my app successfully
Thanks in advance
I made library for my android games and i wanted to add it to another project to test how it works, but when i ran the application, it does not seemed to be able to find my library files(INSTALL_FAILED_MISSING_SHARED_LIBRARY). I have my library .jar in "libs" folder and i also have it added to my Libraries and Order and Export tabs in build path. In my manifest, i have tag. I have Eclipse with ADT. Is there any way to fix this?
Are you using Google Maps in your application? If so, this may solve your problem: INSTALL_FAILED_MISSING_SHARED_LIBRARY error in Android
You wrote:
In my manifest, i have tag
If you are adding custom uses-library tags, that might be your problem. See: Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY