Can't find the libluajava.so - java

I'm using the YOUKU SDK in my Android project, and to my Beta users, their app will crash becasuse of the libluajava.so, like this:
So I google the libluajava.so and download it, put it in the following folders.
// I don't put it in the armeabi folder or the armeabi-v7a folder because the project will say something like there are some duplicate files
But the problem still unsolved, the app still crash because something like that:
But I can't find the 64-bit file on the web, so how can I fix this?

To build .so, you can use this procedure -
Add android ndk tools to a location where your android sdk is present.
Now in your eclipse project, create a jni folder with all your .c and .h files and also your Android.mk file.
Now in your eclipse, goto Run -> External Tools -> External Tools Configuration. For location, press "Browse File System" and choose the "ndk-build" location(which you have put in android sdk folder) For Working Directory, press "Browse Workspace" and choose your eclipse project and your jni folder. For example like this - ${workspace_loc:/yourproject/jni}
Press Apply and then press Run. You have your .so in libs folder of your eclipse project.

Related

Android Studio : Missing SDK

I am on windows 7, i have installed all the java environnement.
JAVA_HOME is working.
When i try to install android studio, he display me a window that said :
Missing SDK
So it's impossible to create or open a project. I have nothing on AppData folder.
I saw all the posts about this question on stackoverflow, nothing helped me.
I try everything, do you have an advice or an idea.
Thx.
FINALLY, I had the same exact problem downloading the latest software 3.0.1 for windows. This process works, before hitting open a new project, go to "configuration" at the bottom of the screen find settings for SDK manager and route the separately downloaded SDK files location to the file. Then any other additional SDK selections you need you can simply click on the box and select it and it will download. No other answers I found helped me except this one. Very simple solution but not so simple if your a first-time user learning this program.
The SDK folder was empty for C:\Users\userID\AppData\Local\Android\SDK
For displaying hidden AppData or Local subfolder: Tools, Folder Options, View, Advanced Settings, Files and Folders, select option Show hidden files, folders, and drives.
The SDK folder should contain the following subfolders:
build-tools.
emulator.
extras.
patcher.
platforms.
platform-tools.
sources.
tools.
Downloaded the zip file to create the tools subfolder
from link, sdk-tools-windows-4333796.zip
of section, Command line tools only, Platform Windows
within URL, https://developer.android.com/studio
Zip file name: sdk-tools-windows-4333796.zip
Copied this zip file into C:\Users\userID\AppData\Local\Android\SDK
Unzipped this file, which created tools subfolder.
Downloaded zip file to create the platform-tools subfolder
from link, Download SDK Platform-Tools for Windows,
within URL, https://developer.android.com/studio/releases/platform-tools.html
Zip file name: platform-tools_r28.0.2-windows.zip
Copied this zip file into C:\Users\userID\AppData\Local\Android\SDK
Unzipped this file, which created platform-tools subfolder.
Open Android Studio and follow prompts. Other subfolders will be created automatically.
you need to download android sdk here
and extract it and give its location in android studio settings > system settings > android sdk.
Hope this will help.

Android external Jar

I have some api with java and I need it in my android app.
When I am using it with including all packages and classes it works fine. Now I create JAR file from my java project using export. Now when I add the jar to my android app as a external jar my all errors are disappeared but when I run my app I got an error
java.lang.NoClassDefFoundError.
I have seen that kind of errors early in my apps and it was the problem of Jar. How can I generate JAR file to avoid this situation?
You have probably built that jar file with jdk 1.7. Classes compiled with jdk 1.7 are not included in apk file. Try to change java compiler to 1.6 before you export jar. In eclipse go to Window -> Preferences -> Java -> Compiler.
copy the jar file in the libs folder of your android project.
After that you may want to clean your project and rebuild it. You can even clear manually the bin dir content.
You have to add your jar file to your project's buildpath.
To make sure it's exported in your APK, you also have to check it under the Order and Export tab, in the build path preferences of your project.
A better approach might be the following:
remove the current exported jar from your project
select the project you want to import, right click -> properties -> android -> check 'mark as library'
right click your current project -> properties -> android -> locate the 'add' button in the bottom. Click it and select the library project.
Using this approach any changes in the library project will be reflected in your current project (at least after doing a clean projects).
I have done it !!! Thanks everybody.
So the solution is :
1. change java compiler to 1.6 before you export jar (As #Lecho mentioned)
2. Move the Jar file to lib folder
So it works !!! thanks everybody

So many errors when trying to import source files into eclipse

I am completely inexperienced, and lately I have hired a contractor to develop an android app for me.
He sent me the source codes and the APK files, but I need to verify whether the source codes are legit, so I am trying to compile them and recreate the APK file.
So far I have installed eclipse, ADT Plugin, and did install the Java thing on my mac.
However when I finally manage to open the source codes up, there are many errors, and I don't know where I can compile it. I mean, is there a button I can click?
I have attached a picture of the errors.
http://i.stack.imgur.com/mfhwN.png
I read elsewhere that eclipse will automatically compile the APK file and save it in the bin folder. However there isn't any APK file in my case.
I am running on Mac Version 10.9.
Please help!!
It seems you have missed some of the jar files or library files.
Right click on Project in Eclipse, Properties on side bar select "Java Build Path" -> "Order and Export" tab. There you can see if any jar files are missing. delete if any and select the jar files from Workspace- project folder.

How to open Android source code in Eclipse ADT

I am new to Android development and I have downloaded Source code of Cameraapp from Google web site from following locaiton:
https://android.googlesource.com/platform/packages/apps/Camera
I am trying to build and compile it into the Eclipse ADT environment. However when I open the folder using File> Import> Android> select existing project, I do not see the folder being able to be selected as a project.
I also noticed that there is no Android Manifest file inside this folder. How is this possible?
I read somewhere that camera app does not have its own Android Manifest file but it uses manifest file from the Gallery App. Which may be right. But my question is that how can I even compile this application?
Or would I have to compile the entire android application folder? Hopefully that is not the case.
If you do not have manifest file in the project then you have no option than to create an empty android project and copy the corresponding res/ and src/ file to your empty project.
Then modify your manifest file to define your activities and permissions. Then you can build and run your project in your ADT workspace.

Build java library with resources

I am trying to make android java library, but when I build my project in output jar library placed only java compiled classes, but no resources and assets.
Also my project contains native libraries, I need to include it in jar too.
PS: I have connect my library project to another project.
PS2: I have find out that resources from library project (res, libs) compiles into apk file, but assets not. How to make assets compile too?
To export jar with resource file please follow the below steps.
1) Right Click on Project Folder
2) Then Click on Export
3) Click on Java -> Jar file.
4) It opens a Jar Export Dialog . Please ensure that Exported generated class file and
resource check-box is checked.
5) Then provide the export destination .
6) Finally click on finish button.
In export menu for eclipse, you have a check box asking you for the inclusion of source files

Categories

Resources