I will try to explain my problem.
For two days I have been struggling with errors popping up during the process of building an android application.
I need to make an Android project for the Structure Core device, the manufacturer has put on his website a sample program and environment for which the scanner works, which I have uploaded to my cloud:
https://1drv.ms/u/s!AoHG6AtGqj2_g0eyFYMyh2uUNJUQ?e=aBpG1T
It's all about the build process itself which will allow me to open this project in Android Studio.
I do everything as in the instructions, but after executing the instructions, I get such an error and I have no idea what caused it. After installing ndk-bundle via SDK Manager, I had an ndk folder in AppData / Local / Android / Sdk, and the console asked for the ndk-bundle folder, so I just changed the name, I don't know if it was a problem, although I didn't find another solution.
At the moment I am working on a Windows generated environment and works good but i have to get an acces to Android App.
Ask if you could try to compile it on your own and possibly send me your ndk-bundle file or tell me what's wrong here.
Stucture Core notes that it is best to use ndk 21.01 and jdk11.
I tried to do this with a lot variation of java version.
Related
I'm getting the following error when I try to run my App on my SmartPhone:
Didn't find class "munyul.game.android02.android.AndroidLauncher" on path: DexPathList
Due to HD issues, I was forced into rebuilding my machine and setting up my developed environment again. After a lot of messing around, I have the following installed and working:
Java 1.8
Eclipse Neon
libGDX
Android SDK Manager
The Android App in question was almost finished, but now that goal seems like a long way off :(
I used libGDX to create a new project, and then I copied the old code into the new project - this is where things got messy.
I had to fix several errors caused by changes in libGDX, which was easy. I then also had to fix several errors caused by changes to Google Services, this was not easy! I eventually read about the new m2repository folder, then I searched for and found the class files needed (play-services-ads, -base, -basement, -games and -plus, inside .aar files), placed all the classes.jar files into their own directory within the android/libs project folder, finally adding references to them from within Eclipse - now everything compiles and looks good (should these .jar files be checked for export? - see edit)
Finally, I had to make one more change; the old project/code was created with a package: munyul.game.android02.android, but the new only had munyul.game.android02, I added the missing package to the new and also updated the AndroidManifest.xml file (maybe this is what went wrong!?).
I've checked the code and manifest and everything looks correct, but when I run the App it instantly crashes with the above mentioned error.
Also, I've checked the Order and Exports for the android project, the boxes that should be checked are.
Anyone know what else I could try?
EDIT:
As a test, I checked the Google Services JAR's for Export, and now I'm getting a different error:
Could not find class 'android.support.v4.util.ArrayMap', referenced from method
com.google.android.gms.common.api.GoogleApiClient$Builder.<init>
I'm starting to think that my error lies with how I resolved my Google Services issues - is there a better way of linking the missing classes? Somehow adding them via Gradle?
EDIT #2:
I migrated the entire project to Android Studio - now the APK installs and runs correctly on all my devices.
Honestly, I would have prefered to stick with Eclipse, but it seems like that is no longer an option - HTH
Check your AndroidManifest.xml for the correct application class (or none if you are not overriding.) The AndroidLauncher is part of the "instant run" feature available in Android Studio and is automatically injected by gradle into the manifest file.
Eclipse is no longer a supported development toolchain - you'll want to do your migration to Android Studio (or IntelliJ) sooner rather than later.
Coming from someone who's only worked in Java casually / when situations absolutely called for it - I'm having a hard time trying to set this up.
I'm trying to follow along this tutorial to build a native Android plugin usable from Unity:
http://jeanmeyblum.weebly.com/scripts--tutorials/communication-between-an-android-app-and-unity
But unfortunately the author skips over the basic steps (understandable for those with prior android dev experience... but not for me!)
I've gone through a checklist of what I had to install, and so far I have:
Android SDK / Android Studio.
Java SDK / SRE 1.8.
Apache ANT.
Made sure I added all the paths required in my PATH System Environment variable to execute:
android
ant
and... java
But at this point, I have no idea what type of Android project I'm supposed to create (see image).
Other puzzling questions: Which SDK do I choose, do I just leave that to default? How do I indicate that this is only a Service JAR, and not an Activity? (assuming that's what's required to be usable in Unity3D).
And after the project is created, can I just open one of the existing classes to write my Service inside it? Or do I need to create a new class file and extend from Service / IntentService?
I can probably figure out the rest to implement in Unity3D after I can manage to compile the JAR file. It's just that initial step I have no idea how to setup.
You will choose very first one "Add No Activity"
The tutorial you are following might be outdated. Here is a good one : http://eppz.eu/blog/unity-android-plugin-tutorial-1/
Hi guys I have created an android studio 2.1 project on my laptop sometime ago and have gotten pretty far with it. I now have a desktop PC that I would LOVE to put my project onto and continue development on. Everything builds just fine on the laptop but when i copy over the entire project over to my desktop it keeps giving me an error for the dex file being over 64k which is clearly not the case on my laptop. I believe im moving the project over to the desktop wrong. I tried many different ways but always get errors when doing so, the closes I got was when I went on my desktop and opened just the gradle.build file in android studio and let it load the project from there. But as stated earlier I get the "dex file exceeds 64k methods". Any help is appreciated.
dex error
create the git repository account and clone it from git repository on other system .
use the multidexEnabled option as true in build.gradle to avoid the multidexing issues
I have always used ADT to develop Android applications, but have moved to a new machine which does not have ADT installed. Google does not seem to support using ADT any more anyway, saying "you should migrate your app development projects to Android Studio as soon as possible". But Android Studio apparently uses Gradle which requires an Internet connection to compile, which won't work for me when I'm on the road, when I can download stuff to install if needed, but don't have an Internet connection when I'm actually working.
So as a work-around I am exploring the idea of not using an IDE at all and just manually compiling everything. (This also seems more future proof against the next time Google decides everyone needs to switch to a whole set of new tools.) I assume that to do this I need a few command line tools, for instance, something like "javac" to compile Java files into class files and next something to create dex file(s) and finally something to package everything together into an apk and sign it. However, when I search for instructions on manual builds I still find constant references to a build system such as Ant or Gradle. I don't want to use any build system!
From scratch, what is the minimum I need in terms of tools I need to download and figure out the command line invocation to turn a simple (let's say "Hello World" simple) java file (and a few support files like a layout XML file and manifest) into a working APK? (Note that I need to build an APK that will work on APIs as old as API level 10.)
Update: Ok, so far I have installed the standalone SDK tools, and have used the SDK Manager to install the SDKs that I need. But now I'm unsure of what commands I need to run: I'm familiar with javac and I see that, but I know there are other commands too. Again, I have seen several SO questions asking about how to build and it refers to things like the ant or android command, which are NOT in the stand-along SDK tools and which shouldn't be necessary if I just knew which commands to invoke manually.
I downloaded the most recent version of Android for Linux (android-sdk_r05-linux_86.tgz). I was trying to use the the Android Ant task(s) for packaging, building, and deploying my code. I should mention that I'm running AMD64, but I have the 32-bit libraries installed. The Android Ant tasks are all broken.
First, the start-emulator task never gets the emulator running. It does get past starting adb, but then it just sits there.
Second, the SDK is missing the AAPT binary in the tools directory. So, the example notepad sample application will not even package correctly.
java.lang.IllegalStateException: Can't find aapt inside the sdk at /home/user/bin/android-sdk-linux_86
at com.googlecode.autoandroid.lib.AndroidTools.locateTool(AndroidTools.java:116)
at com.googlecode.autoandroid.lib.AndroidTools.startTool(AndroidTools.java:103)
at com.googlecode.autoandroid.lib.AndroidTools.startTool(AndroidTools.java:91)
at com.googlecode.autoandroid.lib.UnixAndroidTools.aapt(UnixAndroidTools.java:9)
I have all the dependencies configured for Android. I can run it from the command line just fine.
I assume the Ant code is out of sync with the recent SDK updates. Can anyone shed some light on this problem? At this point, I'm considering writing my own Python scripts to interact with the Android SDK. Ugh.
For anyone running into this recently, aapt moved again. It's now in $ANDROID_SDK/build-tools/17.0.0.
I have written three books all using the Android Ant build scripts. Trust me, they work.
First, the start-emulator task never
gets the emulator running. It does get
past starting adb, but then just sits
there.
Run the android command and launch the emulator from AVD Manager window that appears. AFAIK, there is no start-emulator task in Ant -- in fact, I'm not aware that there ever has been one.
Second, the SDK is missing the aapt
binary in the tools directory.
If you are looking in $ANDROID_HOME/tools/ (where $ANDROID_HOME is where you unpacked the SDK), you aren't supposed to find aapt there. That directory is for tools that directly support all API levels. API-level-specific tools, like aapt, will reside in $ANDROID_HOME/platforms/$SDK/tools/ (where $SDK is the name of some Android version, like android-2.1).
If you do not have anything in $ANDROID_HOME/platforms/, please follow step 4 of the installation instructions.