I have been trying for last 2 days to compile a helloworld project for android. It had been giving different errors so far but I found my way through using the different questions asked here by users or at stackoverflow. But now, I have searched everywhere and couldn't find a proper solution anywhere.
When I try to run the build_native.sh in cygwin, it starts compiling but in the libgame.so shared library, it gives an error with exit code 1. Other guys have been getting this type of errors but none of their solution work for me.
I have checked the android.mk and the references are the correct.
Every way I tried has failed. I need serious help :(
Thanks a lot :)
P.S I am using windows8 (64 bit).
I didn't set up the paths in the main.c file. It needed to be pointed to the right folder (classes) Unfortunately no article or tutorial mentioned it, managed it by trial and error.
Related
I recently read about the concept of reverse engineering and wanted to try it.
So I downloaded an apk and extracted it source code by using
apktool, dex2jar and jd-gui
Every thing went on smoothly and I extracted the resource as well as java files successfully. However the problem arose when I tried to import this project in android studio.
Initially it was showing a number resource files related errors which I corrected by changing the dependencies of the project but now I am getting all these weird errors in java files.
The errors include "not a statement', 'variable not initialized' etc.
Kindly Help. Thanks in Advance!
I have extracted code from apk before myself, and the results I got were similar to yours. I got most of the code, but not all of it and not with all of the formatting. Numerical constants were missing and the the "if, while, for" instructions were faulty. I don't know if this always happens, I did it only once, but I managed to figure out the rest of the code by what this processes gave me in the begging.
First off I'm soooooo frustrated trying to get android.appcompat....gridlayout to work. I've followed lots of tutorials and just keep getting that horrible "android.support.v7.widget.GridLayout failed to instantiate" message. So I'm doing some serious detective work to try and understand everything about the compat libraries.
So like the title asks, what is the difference? I'm building the libs/android-...jar files, adding them to the path, following all the directions on https://developer.android.com/tools/support-library/setup.html
Any insight? Should I just uninstall eclipse and start from scratch to try and do this? I'm working with a test project and nothing is working. I keep getting 1 instantiation errors along with an error saying "a resource already exists on disk 'C:......\android-supp..-gridlayout.settings' and '....prefs'.
Please please any insight. Have spent a long time on this. Any advice is much appreciated.
they both refer to the same "v7 appcompat library" discussed at the android developer site.
You cannot just copy the jar file, as this library has resources that are referred to by your project so it needs to be added as a library project with resources as discussed here.
Can't find any useful info on this using Google.
All I found are people asking how to resolve compilation errors such as
make: *** No rule to make target `/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/SHARED_LIBRARIES/libril_intermediates/export_includes', needed by `/home/joe/[ubuntuTouch]/out/target/product/jewel/obj/EXECUTABLES/rild_intermediates/import_includes'. Stop.
In case anyone does come here with that compilation error, I had this problem when I switched to a different terminal window and forgot to call lunch. (I had called source build/envsetup.sh).
I had the same problem. When I looked closely at the error stack, it seemed that the /hardware/ril folder of the AOSP had gotten corrupted.
My solution was to remove the entire folder (/hardware) and then redo repo sync. This fixed the sources and it took about 3 minutes. But I do think that it will work best if your development environment is setup according to AOSP source download
Hope that helps someone.
you have to sync ril-caf repo from cm or lineage os .It was missing in your source.
Does anyone know how to play .mp4 video as live wallpaper?
I searched a lot, but couldn't find the solution. I just found this one but I am not getting any idea from it.
Please help me if you have any idea regarding this concept.
After spending 3 days finally I run this project in eclipse.
I am sharing the steps as it may help others:
Firstly, the most important thing is that Your project path and ndk path should not contain spaces else you will have problems following these steps. I also faced problems with it so please remove the spaces, if any.
For example :-
android ndk/Live wallpaper
replace it with
androidndk/Livewallpaper
Following are steps :-
1) Install NDK from Android NDK page
(I used Ubuntu OS)
2) Install plugins for NDK ( https://dl-sl.google.com/android/eclipse/ )
3) Open your terminal and go to your project directory path
For Example :- /yourprojectname$
4) Now from your project directory path write Your Android NDk path
For Example :-
/home/rainc/android_setup/android-ndk-r8d/ndk-build
And Press Enter. This will give you a .so file which means the library file has been generated..
You have done it successfully. If you are getting error(s) here then the installation and the other steps might be having error(s).
Following links helped me in my research:
First
Second
Third
And also thanks to Lazy Ninja for helping me.
You are up on a good challenge, unless you are familiar with android ndk. There is the library ffmpeg which will save you some time.
A tutorial on Video Live Wallpaper here.Go through part 1 -4.
And here is a link of the project code.
Hope it will help you get started.
I wonder if anyone else had problems running the ./ndk-build on apdfviewer?
I've everything working and set.. but i get errors for missing files (SkCanvas.h, SkPaint.h) .. and others related to 'LOGE'..? (i get those on cygwin console)
Can't figure out what am I missing... well, besides those missing files... but i "don't buy" that the developer has forgotten... I think I'm missing some import...
Please help...
Thanks!!
SkCanvas.h is part of skia, 2D Graphics Library. it's one of the build dependences.