-
Crash on apk startup
Here’s the issue; Recently I got a new pc, I installed Clickteam fusion and the android and ios exporters. Im running version 2.5 build r282.3 btw.
I did not install the java sdk or the android sdk, because I copied the entire hard disc from my old machine, so I just changed the file directories in clickteam fusion. My problem is this; I can compile apk files with no error message, but when I open them on a phone they open, but then immediately crash. I don't understand why this happens, even programs that worked fine, when they were compiled on my old pc crash when compiled on the new one.
Im running the same operating system. Any advice?
--------------------------------------------
im going to try installing the Java sdk and android sdk and see if that works. I'll post back here after I do this.
-
Odd & weird
I recently did that to my hard drive as I went to an SSD.
Everything moved over fine.
My only advice is to perhaps reinstall the Java JDK to make sure something odd didn't happen.
Perhaps also run the Android SDK manager and make sure that is all updated.
-
You need to re-install it, since it's making changes to your registry as well.
-
I didn't know there were registry changes. I’m in the process of using the Android SDK manager to update everything. Will post an update after I re-compile.
-
Yes like
HKCU\SOFTWARE\Android SDK Tools\
HKLM\SOFTWARE\Android SDK Tools\
-
It won't compile now. I get the following error message
---------------------------------------------------------------------------
Buildfile: D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\build.xml
[taskdef] Could not load definitions from resource emma_ant.properties. It could not be found.
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}
-pre-build:
-check-env:
[checkenv] Android SDK Tools Revision 23.0.0
[checkenv] Installed at D:\Program Files\Android\android-sdk
-setup:
[echo] Project Name: RuntimeAndroid
[gettype] Project Type: Application
-build-setup:
[getbuildtools] Using latest Build Tools: 19.1.0
[echo] Resolving Build Target for RuntimeAndroid...
[gettarget] Project Target: Android 4.0
[gettarget] API level: 14
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\bin
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\bin\res
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\bin\rsObj
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\bin\rsLib s
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\gen
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\bin\class es
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\bin\dexed Libs
[echo] ----------
[echo] Resolving Dependencies for RuntimeAndroid...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 437 source files to D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\bin\class es
[javac] D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\src\Exten sions\CRunAndroid.java:46: package android.annotation does not exist
[javac] import android.annotation.SuppressLint;
[javac] ^
[javac] D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\src\Objec ts\CQuestion.java:31: package android.annotation does not exist
[javac] import android.annotation.SuppressLint;
[javac] ^
[javac] D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\src\Runti me\MMFRuntime.java:78: cannot find symbol
[javac] symbol: class SuppressLint
[javac] @SuppressLint("NewApi")
[javac] ^
[javac] D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\src\Runti me\SurfaceView.java:56: cannot find symbol
[javac] symbol: class SuppressLint
[javac] @SuppressLint("NewApi")
[javac] ^
[javac] D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\src\Servi ces\CINI.java:24: cannot find symbol
[javac] symbol: class SuppressLint
[javac] @SuppressLint("DefaultLocale")
[javac] ^
[javac] com\amazon\device\gamecontroller\GameController.cl ass(com\amazon\device\gamecontroller:GameControlle r.class): warning: Cannot find annotation method 'value()' in type 'android.annotation.SuppressLint'
[javac] D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\src\Exten sions\CRunAndroid.java:330: cannot find symbol
[javac] symbol : class SuppressLint
[javac] location: class Extensions.CRunAndroid
[javac] @SuppressLint("NewApi")
[javac] ^
[javac] D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\src\Runti me\MMFRuntime.java:371: cannot find symbol
[javac] symbol : class SuppressLint
[javac] location: class Runtime.MMFRuntime
[javac] @SuppressLint("NewApi")
[javac] ^
[javac] D:\DOCUME~1\BOB\LOCALS~1\Temp\And23A.tmp\src\Runti me\SurfaceView.java:117: cannot find symbol
[javac] symbol : class SuppressLint
[javac] location: class Runtime.SurfaceView
[javac] @SuppressLint("DefaultLocale")
[javac] ^
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] 8 errors
[javac] 1 warning
BUILD FAILED
D:\Program Files\Android\android-sdk\tools\ant\build.xml:720: The following error occurred while executing this line:
D:\Program Files\Android\android-sdk\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.
Total time: 6 seconds
----------------------------------------------------
what shall I do?
-
Check the paths to the Java JDK and Google SDK inside of Fusion.
What do they say?
Mine are:
C:\Program Files (x86)\Java\jdk1.8.0
and
C:\Program Files (x86)\Android\android-sdk
-
the paths are D:\Program Files\Java\jdk1.6.0_04
and D:\Program Files\Android\android-sdk
edit
---------------------------------------------------
actually on running the Android sdk manager it seems some
components aren't installed. I think this might be the problem.
I'll post back after their installed and I try to compile again.
-
OK easy fix.
Seems like your using the wrong API
Check under your main project / Android Tab and see what API is used.
Make sure you have that one installed, or select the API that you have installed.
It looks like API 14 is selected in the project, but you have 18/19 installed
-
Ok the project is set to build api 14
the minimum and target android versions are 4.0/4.01/4.02.
in the android Sdk manager all components of android 4.0(api 14)
are installed, however I compile the project and get this error message:
-----------------------------------------------------------------------
Buildfile: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\build.xml
-set-mode-check:
-set-release-mode:
-release-obfuscation-check:
[echo] proguard.config is ${proguard.config}
-pre-build:
-check-env:
[checkenv] Android SDK Tools Revision 23.0.2
[checkenv] Installed at D:\Program Files\Android\android-sdk
-setup:
[echo] Project Name: RuntimeAndroid
[gettype] Project Type: Application
-build-setup:
[getbuildtools] Using latest Build Tools: 19.1.0
[echo] Resolving Build Target for RuntimeAndroid...
[gettarget] Project Target: Android 4.0
[gettarget] API level: 14
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\res
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\rsObj
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\rsLib s
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\gen
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\class es
[mkdir] Created dir: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\dexed Libs
[echo] ----------
[echo] Resolving Dependencies for RuntimeAndroid...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
[echo] ----------
[echo] Building Libraries with 'release'...
[subant] No sub-builds to iterate on
-code-gen:
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
[echo] Handling aidl files...
[aidl] No AIDL files to compile.
[echo] ----------
[echo] Handling RenderScript files...
[echo] ----------
[echo] Handling Resources...
[aapt] Generating resource IDs...
[echo] ----------
[echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.
-pre-compile:
-compile:
[javac] Compiling 452 source files to D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\class es
[javac] Note: Some input files use or override a deprecated API.
[javac] Note: Recompile with -Xlint:deprecation for details.
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
-post-compile:
-obfuscate:
-dex:
[dex] input: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\class es
[dex] input: D:\Program Files\Android\android-sdk\tools\support\annotations.jar
[dex] input: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\ouya-sdk.jar
[dex] input: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\noti fication.jar
[dex] input: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\goog le-play-services.jar
[dex] input: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\andr oid-support-v4.jar
[dex] input: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\game controller.jar
[dex] Pre-Dexing D:\Program Files\Android\android-sdk\tools\support\annotations.jar -> annotations-891e9623e997cafcd5c658ab313af6c4.jar
[dx]
[dx] ERROR: No suitable Java found. In order to properly use the Android Developer
[dx] Tools, you need a suitable version of Java JDK installed on your system.
[dx] We recommend that you install the JDK version of JavaSE, available here:
[dx] http://www.oracle.com/technetwork/java/javase/downloads
[dx]
[dx] If you already have Java installed, you can define the JAVA_HOME environment
[dx] variable in Control Panel / System / Avanced System Settings to point to the
[dx] JDK folder.
[dx]
[dx] You can find the complete Android SDK requirements here:
[dx] http://developer.android.com/sdk/requirements.html
[dx]
[dex] Pre-Dexing D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\ouya-sdk.jar -> ouya-sdk-eac37e867a521d0ab66877e5395de8ab.jar
[dx]
[dx] ERROR: No suitable Java found. In order to properly use the Android Developer
[dx] Tools, you need a suitable version of Java JDK installed on your system.
[dx] We recommend that you install the JDK version of JavaSE, available here:
[dx] http://www.oracle.com/technetwork/java/javase/downloads
[dx]
[dx] If you already have Java installed, you can define the JAVA_HOME environment
[dx] variable in Control Panel / System / Avanced System Settings to point to the
[dx] JDK folder.
[dx]
[dx] You can find the complete Android SDK requirements here:
[dx] http://developer.android.com/sdk/requirements.html
[dx]
[dex] Pre-Dexing D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\noti fication.jar -> notification-d5c027b8d4a151672cf801d6f412b8ea.jar
[dx]
[dx] ERROR: No suitable Java found. In order to properly use the Android Developer
[dx] Tools, you need a suitable version of Java JDK installed on your system.
[dx] We recommend that you install the JDK version of JavaSE, available here:
[dx] http://www.oracle.com/technetwork/java/javase/downloads
[dx]
[dx] If you already have Java installed, you can define the JAVA_HOME environment
[dx] variable in Control Panel / System / Avanced System Settings to point to the
[dx] JDK folder.
[dx]
[dx] You can find the complete Android SDK requirements here:
[dx] http://developer.android.com/sdk/requirements.html
[dx]
[dex] Pre-Dexing D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\goog le-play-services.jar -> google-play-services-16afa79d5269532958472a06054cc2af.jar
[dx]
[dx] ERROR: No suitable Java found. In order to properly use the Android Developer
[dx] Tools, you need a suitable version of Java JDK installed on your system.
[dx] We recommend that you install the JDK version of JavaSE, available here:
[dx] http://www.oracle.com/technetwork/java/javase/downloads
[dx]
[dx] If you already have Java installed, you can define the JAVA_HOME environment
[dx] variable in Control Panel / System / Avanced System Settings to point to the
[dx] JDK folder.
[dx]
[dx] You can find the complete Android SDK requirements here:
[dx] http://developer.android.com/sdk/requirements.html
[dx]
[dex] Pre-Dexing D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\andr oid-support-v4.jar -> android-support-v4-bd28c02657ec3ebb6f429f4f5d1a8ebf.jar
[dx]
[dx] ERROR: No suitable Java found. In order to properly use the Android Developer
[dx] Tools, you need a suitable version of Java JDK installed on your system.
[dx] We recommend that you install the JDK version of JavaSE, available here:
[dx] http://www.oracle.com/technetwork/java/javase/downloads
[dx]
[dx] If you already have Java installed, you can define the JAVA_HOME environment
[dx] variable in Control Panel / System / Avanced System Settings to point to the
[dx] JDK folder.
[dx]
[dx] You can find the complete Android SDK requirements here:
[dx] http://developer.android.com/sdk/requirements.html
[dx]
[dex] Pre-Dexing D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\libs\game controller.jar -> gamecontroller-8f73ab4772efcf8f0590713e573e9399.jar
[dx]
[dx] ERROR: No suitable Java found. In order to properly use the Android Developer
[dx] Tools, you need a suitable version of Java JDK installed on your system.
[dx] We recommend that you install the JDK version of JavaSE, available here:
[dx] http://www.oracle.com/technetwork/java/javase/downloads
[dx]
[dx] If you already have Java installed, you can define the JAVA_HOME environment
[dx] variable in Control Panel / System / Avanced System Settings to point to the
[dx] JDK folder.
[dx]
[dx] You can find the complete Android SDK requirements here:
[dx] http://developer.android.com/sdk/requirements.html
[dx]
[dex] Converting compiled files and external libraries into D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\class es.dex...
[dx]
[dx] ERROR: No suitable Java found. In order to properly use the Android Developer
[dx] Tools, you need a suitable version of Java JDK installed on your system.
[dx] We recommend that you install the JDK version of JavaSE, available here:
[dx] http://www.oracle.com/technetwork/java/javase/downloads
[dx]
[dx] If you already have Java installed, you can define the JAVA_HOME environment
[dx] variable in Control Panel / System / Avanced System Settings to point to the
[dx] JDK folder.
[dx]
[dx] You can find the complete Android SDK requirements here:
[dx] http://developer.android.com/sdk/requirements.html
[dx]
-crunch:
-package-resources:
[aapt] Creating full resource package...
-package:
[apkbuilder] Current build type is different than previous build: forced apkbuilder run.
[apkbuilder] Creating RuntimeAndroid-release-unsigned.apk for release...
BUILD FAILED
D:\Program Files\Android\android-sdk\tools\ant\build.xml:962: The following error occurred while executing this line:
D:\Program Files\Android\android-sdk\tools\ant\build.xml:973: The following error occurred while executing this line:
D:\Program Files\Android\android-sdk\tools\ant\build.xml:312: com.android.sdklib.build.ApkCreationException: java.io.FileNotFoundException: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\class es.dex does not exist
at com.android.sdklib.build.ApkBuilder.init(ApkBuilde r.java:469)
at com.android.sdklib.build.ApkBuilder.<init>(ApkBuil der.java:396)
at com.android.ant.ApkBuilderTask.execute(ApkBuilderT ask.java:334)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(S equential.java:68)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execut e(MacroInstance.java:398)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(S equential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java :124)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(S equential.java:68)
at com.android.ant.IfElseTask.execute(IfElseTask.java :124)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.Sequential.execute(S equential.java:68)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.taskdefs.MacroInstance.execut e(MacroInstance.java:398)
at org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:291)
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknow n Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:39 0)
at org.apache.tools.ant.Target.performTasks(Target.ja va:411)
at org.apache.tools.ant.Project.executeSortedTargets( Project.java:1397)
at org.apache.tools.ant.Project.executeTarget(Project .java:1366)
at org.apache.tools.ant.helper.DefaultExecutor.execut eTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Projec t.java:1249)
at org.apache.tools.ant.Main.runBuild(Main.java:801)
at org.apache.tools.ant.Main.startAnt(Main.java:218)
at org.apache.tools.ant.launch.Launcher.run(Launcher. java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher .java:109)
Caused by: java.io.FileNotFoundException: D:\DOCUME~1\BOB\LOCALS~1\Temp\And2C2.tmp\bin\class es.dex does not exist
at com.android.sdklib.build.ApkBuilder.checkInputFile (ApkBuilder.java:938)
at com.android.sdklib.build.ApkBuilder.init(ApkBuilde r.java:440)
... 62 more
Total time: 28 seconds
--------------------------
what should I do?, im looking for a way to set the Java home environment, since the error mentions this.
-------------------------------------------------------
edit
I defined the JAVA_HOME environment from system and set the directory to D:\Program Files\Java\jdk1.6.0_04,
still I receive the same error message. Any suggestions?
---------------------------------------------------