Error while trying to to do android install
Execution failed for task ':mergeClassesIntoJar'.
Cannot expand ZIP 'C:\Users\Path..\AppData\Local\Android\sdk\extras\android\support\multidex\library\libs\android-support-multidex.jar' as it does not exist.
Can any one pleas help am fed up of this issue no proper solution below is my code
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.9'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.netbeansdemo.NetbeansDemo'
dependencies {
compile 'com.gluonhq:charm:3.0.0'
androidRuntime 'com.gluonhq:charm-android:3.0.0'
iosRuntime 'com.gluonhq:charm-ios:3.0.0'
desktopRuntime 'com.gluonhq:charm-desktop:3.0.0'
}
jfxmobile {
android {
manifest = 'src/android/AndroidManifest.xml'
androidSdk = 'C:/Users/ee209275/AppData/Local/Android/Sdk'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'io.datafx.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
You need to update the Gluon plugin for your IDE, so you can generate a project with updated dependencies. Current versions of the plugin are 2.5.0 for NetBeans and IntelliJ, 2.4.0 for Eclipse.
For a single view project, this will be the build.gradle file you will get:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.6'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.gluonhq.testplugin.GluonTestPlugin'
dependencies {
compile 'com.gluonhq:charm:4.3.5'
}
jfxmobile {
downConfig {
version = '3.3.0'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
You have an issue with the Android SDK path. This question shows how to solve it.
Basically:
Open the Android SDK Manager and make sure you have installed Extras/Google Repository and Extras/Android Support Repository.
Remove the androidSdk line from the android block on your build.gradle file and move it to a properties file. For that, just create a properties file under C:\Users\<user>\.gradle\gradle.properties, and add the ANDROID_HOME variable: ANDROID_HOME=C:/<path.to.Android>/sdk.
Then reload your project, see that it works on desktop, and then deploy to mobile.
Related
I have a project with a Gradle buildscript and I added the bmuschko/gradle-docker-plugin to create and push image on new builds.
However I cant use the plugin if I don't specify jcenter() in root level repositories, but that breaks my build, so im kinda lost.
If I add the root level jcenter() it fails the build with:
Could not resolve all dependencies for configuration ':compileClasspath'.
Could not find com.sleepycat:je:7.0.6. Searched in the following locations:
https://jcenter.bintray.com/com/sleepycat/je/7.0.6/je-7.0.6.pom
https://jcenter.bintray.com/com/sleepycat/je/7.0.6/je-7.0.6.jar
https://repo1.maven.org/maven2/com/sleepycat/je/7.0.6/je-7.0.6.pom
https://repo1.maven.org/maven2/com/sleepycat/je/7.0.6/je-7.0.6.jar
https://nexus.company.com/content/groups/public/com/sleepycat/je/7.0.6/je-7.0.6.pom
https://nexus.company.com/content/groups/public/com/sleepycat/je/7.0.6/je-7.0.6.jar
Required by: project : > org.jpos:jpos:2.1.1
However if I don't add it i get this:
Could not resolve all dependencies for configuration ':dockerJava'.
Could not find com.aries:docker-java-shaded:3.1.0-rc-3. Searched in the following locations:
https://nexus.company.com/content/groups/public/com/aries/docker-java-shaded/3.1.0-rc-3/docker-java-shaded-3.1.0-rc-3.pom
https://nexus.company.com/content/groups/public/com/aries/docker-java-shaded/3.1.0-rc-3/docker-java-shaded-3.1.0-rc-3-cglib.jar
Required by: project :
Should I perhaps build Java shaded and include in our local Maven repo?
Here is the script:
buildscript {
repositories {
jcenter()
mavenCentral()
maven {
url = 'https://nexus.company.com/content/repositories/snapshots/'
credentials {
username 'na'
password 'na'
}
}
}
dependencies {
classpath group: 'com.company.gradle', name: 'cpmgradle', version: '0.1-SNAPSHOT'
classpath 'com.bmuschko:gradle-docker-plugin:3.4.4'
}
}
// ADDING THIS BREAKS MY BUILD BUT IS NECESSARY FOR DOCKER PLUGIN TO WORK
repositories {
jcenter()
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'com.company.gradle.java'
apply plugin: 'com.bmuschko.docker-remote-api'
projectinfo {
group = 'com.company.mesb'
artifact = 'MESB'
version = '1.29.DEV-SNAPSHOT'
description = 'MESB'
packaging = 'jar'
}
dependencies {
compile 'org.jpos:jpos:2.1.1'
compile 'org.jdom:jdom2:2.0.6'
compile 'org.json:json:20140107'
compile 'com.company.javasdk:JavaSDK:1.1.JDOM2-SNAPSHOT'
compile 'com.company.javasdk:Base64:1.0'
compile 'org.apache.wss4j:wss4j-ws-security-dom:2.0.3'
compile 'org.apache.santuario:xmlsec:2.0.3'
compile 'org.slf4j:slf4j-log4j12:1.7.10'
compile 'com.google.code.gson:gson:2.3.1'
compile 'org.bouncycastle:bcprov-jdk15on:1.54'
compile 'org.bouncycastle:bcpkix-jdk15on:1.54'
compile 'junit:junit:4.12'
compile 'org.jsoup:jsoup:1.9.2'
compile 'org.apache.commons:commons-lang3:3.4'
compile 'com.ibm:mq:5.3.07'
compile 'com.ibm:mq.pcf:5.3.07'
compile 'com.ibm:mq.jmqi:5.3.07'
compile 'com.ibm:mq.headers:5.3.07'
compile 'com.ibm:mq.commonservices:5.3.07'
compile 'com.ibm:connector:1.0.0'
runtime 'jaxen:jaxen:1.1.6'
runtime 'xalan:xalan:2.7.2'
runtime 'org.postgresql:postgresql:8.0-311.jdbc3'
runtime 'commons-logging:commons-logging:1.2'
}
compileJava {
sourceCompatibility = 1.6
targetCompatibility = 1.6
options.fork = true
options.compilerArgs << '-XDignore.symbol.file'
options.forkOptions.executable = 'javac'
}
task libs(type: Copy) {
description = "Copies dependencies to the 'lib' directory of the deployment."
def libsDir = new File("$buildDir", 'libs')
libsDir.mkdirs()
def dockerDir = new File("$buildDir", 'docker')
dockerDir.mkdirs()
from project.configurations.runtime
into libsDir
}
task bundleZip(type: Zip) {
from projectDir
include 'xsl/**'
include 'conf/**'
include 'js/**'
include 'test/**'
include 'mesb.sh'
from(tasks.libs.outputs) {
include 'MESB*'
}
into project.projectinfo.version
}
tasks.bundleZip.dependsOn jar
tasks.bundleZip.dependsOn libs
def dockerUsername = project.properties['dockerUsername'] ?: ""
def dockerPassword = project.properties['dockerPassword'] ?: ""
docker {
registryCredentials {
username = dockerUsername
password = dockerPassword
}
}
task buildImage(type: com.bmuschko.gradle.docker.tasks.image.DockerBuildImage) {
doFirst {
copy {
from "${buildDir}/libs/MESB-${projectinfo.version}.jar"
into "${buildDir}/docker"
rename { String fileName ->
fileName.replace("-${projectinfo.version}", "")
}
}
copy {
from "docker/jdk/Dockerfile"
into "${buildDir}/docker"
}
copy {
from "xsl"
into "${buildDir}/docker/xsl"
}
copy {
from "conf"
into "${buildDir}/docker/conf"
}
copy {
from "test"
into "${buildDir}/docker/test"
}
copy {
from "${buildDir}/libs"
into "${buildDir}/docker/libs"
}
}
inputDir = project.file("${buildDir}/docker")
tag = "company/mesb:${projectinfo.version}"
}
tasks.buildImage.dependsOn build
task pushImage(type: com.bmuschko.gradle.docker.tasks.image.DockerPushImage) {
imageName = "company/mesb"
tag = "${projectinfo.version}"
}
tasks.pushImage.dependsOn buildImage
artifacts {
archives bundleZip
}
/* Remove the default JAR file from the uploaded artifacts */
configurations.archives.artifacts.with { archives ->
def jarArtifact
archives.each {
if (it.file =~ 'jar') {
jarArtifact = it
}
}
remove(jarArtifact)
}
jar {
dependsOn configurations.runtime
manifest {
attributes 'Main-Class': 'main.MESB'
}
}
tasks.build.dependsOn libs
sourceSets {
main {
java {
srcDir 'src'
}
}
}
Apparently moving root repository definitions benieth the apply plugins section solved this.
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'com.company.gradle.java'
apply plugin: 'com.bmuschko.docker-remote-api'
repositories {
jcenter()
mavenCentral()
}
Don't know whether you have solved your issue but either way...
I encountered a similar issue regarding:
Could not resolve all dependencies for configuration ':dockerJava'.
Could not find com.aries:docker-java-shaded:3.1.0-rc-3.
We solved it by adding the following
repositories {
maven { url "https://repo.spring.io/snapshot" }
maven { url "https://repo.spring.io/milestone" }
}
Google released a few months ago a gradle plugin for java 8 support on Android API level 24 and up. This is achieved by adding the dependency to the gradle build file:
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:2.4.0-alpha7'
}
}
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
Is this supported with Gluon Mobile?
I have installed builds tools 25.0.3, and without any modification at all of the build.gradle file that the Gluon plugin generates on a Single View project:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.8'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.gluonandroid24.GluonAndroid24'
dependencies {
compile 'com.gluonhq:charm:4.3.7'
}
jfxmobile {
downConfig {
version = '3.6.0'
// Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
plugins 'display', 'lifecycle', 'statusbar', 'storage'
}
android {
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
I can include Java 8 streams:
public BasicView(String name) {
super(name);
Label label = new Label("Hello JavaFX World!");
Button button = new Button("Change the World!");
button.setGraphic(new Icon(MaterialDesignIcon.LANGUAGE));
button.setOnAction(e -> label.setText("Sum: " + Stream.of("1", "2", "5")
.mapToInt(Integer::parseInt)
.sum()));
VBox controls = new VBox(15.0, label, button);
controls.setAlignment(Pos.CENTER);
controls.getChildren().stream()
.filter(Label.class::isInstance)
.forEach(System.out::println);
setCenter(controls);
}
and run the project on Desktop and deploy it and run it successfully on Android (at least on my device with Android 7.1.1). Obviously not on iOS.
The jfxmobile plugin already looks for the latest build-tools version you have installed at $AndroidSdk/build-tools. In case you want to set some options, you could set:
jfxmobile {
...
android {
manifest = 'src/android/AndroidManifest.xml'
buildToolsVersion = '25.0.3'
compileSdkVersion = '25'
minSdkVersion = '25'
targetSdkVersion = '25'
}
}
Similar question but didn't help: JavaFXPorts(Gluon Plugin) Saving Files on Android
I want to access the local storage on desktop and mobile. For now I'm testing on desktop. Whenever i launch the program I get the following in the error stream:
Mar 18, 2017 3:57:47 PM com.gluonhq.charm.down.Platform <clinit>
SEVERE: javafx.platform is not defined. Desktop will be assumed by default.
Mar 18, 2017 3:57:48 PM com.gluonhq.impl.charm.a.c.a <clinit>
SEVERE: null
java.io.IOException: Private storage file not available
at com.gluonhq.impl.charm.a.c.a.c(SourceFile:37)
at java.util.Optional.orElseThrow(Optional.java:290)
at com.gluonhq.impl.charm.a.c.a.<clinit>(SourceFile:37)
at com.gluonhq.charm.glisten.application.MobileApplication.a(SourceFile:244)
at com.gluonhq.charm.glisten.application.MobileApplication.start(SourceFile:211)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
at java.lang.Thread.run(Thread.java:745)
and Services.get(StorageService.class); return an empty optional.
The trimmed down gradle build file is
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.3.2'
}
}
apply plugin: 'org.javafxports.jfxmobile'
apply plugin: 'eclipse'
jfxmobile {
downConfig {
version = '3.0.0'
plugins 'display', 'lifecycle', 'statusbar', 'storage' // <-- storage included by default
}
android {
compileSdkVersion = 23
manifest = 'src/android/AndroidManifest.xml'
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
eclipse {
classpath {
downloadJavadoc = true
downloadSources = true
}
}
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.foo.MainClass'
dependencies {
compile 'com.gluonhq:charm:4.3.1'
}
task wrapper(type: Wrapper) {
gradleVersion = '3.4'
}
Not sure what this version is
jfxmobile {
downConfig {
version = '3.0.0'
because if I change it to 4.3.1 Gradle gives me an error (can post if relevant).
Also I tried adding to dependencies {
desktopRuntime "com.gluonhq:charm-down-desktop:4.3.1"
like in the linked question but it did nothing.
I tried to bind my project using this but however i failed to achieve so i am getting errors like
noClassDefFoundFor NSObject
i also tried to add the older version
ie this but here i am not able to link admob module to my ios module error which i an getting in this case is:
no Configuration found for 'default'
i am using latest version of LibGDX.
log snippet:
ava.lang.NoClassDefFoundError: org/robovm/apple/foundation/NSObject$Handle
at org.robovm.pods.google.mobileads.GADRequest.<init>(GADRequest.java)
at com.blurpixel.arcpop.ViewController.createAndLoadBanner(ViewController.java)
at com.blurpixel.arcpop.ViewController.intializeAds(ViewController.java)
at com.blurpixel.arcpop.ViewController.showAds(ViewController.java)
at com.blurpixel.arcpop.Menu.show(Menu.java)
at com.badlogic.gdx.Game.setScreen(Game.java)
at com.blurpixel.arcpop.GameClass.create(GameClass.java)
at com.badlogic.gdx.backends.iosrobovm.IOSGraphics.draw(IOSGraphics.java)
at com.badlogic.gdx.backends.iosrobovm.IOSGraphics$1.draw(IOSGraphics.java)
at com.badlogic.gdx.backends.iosrobovm.IOSGraphics$1.$cb$drawRect$(IOSGraphics.java)
at org.robovm.apple.uikit.UIApplication.main(Native Method)
at org.robovm.apple.uikit.UIApplication.main(UIApplication.java)
at com.blurpixel.arcpop.IOSLauncher.main(IOSLauncher.java)
and what i am doing in my code is:
adView = new GADBannerView(GADAdSize.SmartBannerPortrait());
adView.setAdUnitID("xxxxxxxxxxxxxxx");
adView.setRootViewController(UIApplication.getSharedApplication().getKeyWindow().getRootViewController());
UIApplication.getSharedApplication().getKeyWindow().getRootViewController().getView().addSubview(adView);
GADRequest request = new GADRequest();//this line is creating this error if i am commenting this line + the adview.loadAd line i am getting my game running without ads.
request.setTestDevices(Arrays.asList(GADRequest.getSimulatorID()));
adView.setDelegate(new GADBannerViewDelegateAdapter() {
#Override
public void didReceiveAd(GADBannerView view) {
super.didReceiveAd(view);
}
#Override
public void didFailToReceiveAd(GADBannerView view, GADRequestError error) {
super.didFailToReceiveAd(view, error);
System.out.println("Failed to recieve ");
}
});
adView.loadRequest(request);
Gradle files:
ios gradle:
sourceSets.main.java.srcDirs = ["src/"]
sourceCompatibility = '1.7'
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
ext {
mainClassName = "com.blurpixel.arcpop.IOSLauncher"
}
launchIPhoneSimulator.dependsOn build
launchIPadSimulator.dependsOn build
launchIOSDevice.dependsOn build
createIPA.dependsOn build
eclipse.project {
name = appName + "-ios"
natures 'org.robovm.eclipse.RoboVMNature'
}
dependencies {
compile "org.robovm:robopods-google-mobile-ads-ios:1.13.1-SNAPSHOT"
compile "org.robovm:robopods-google-apis-ios:1.13.1-SNAPSHOT"
}
build.gradle:
buildscript {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
dependencies {
classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
classpath 'com.android.tools.build:gradle:2.1.2'
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.2.0-SNAPSHOT'
}
}
allprojects {
apply plugin: "eclipse"
apply plugin: "idea"
version = '1.2'
ext {
appName = "ArcPOP"
gdxVersion = '1.9.2'
roboVMVersion = '1.14.0'
robopodsVersion = '1.13.1'
box2DLightsVersion = '1.4'
ashleyVersion = '1.7.0'
aiVersion = '1.8.0'
admobVersion = '9.0.1'
}
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://oss.sonatype.org/content/repositories/releases/" }
}
}
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
}
}
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86_64"
compile 'com.google.android.gms:play-services-ads:9.0.1'
compile 'com.facebook.android:facebook-android-sdk:4.1.0'
}
}
project(":ios") {
apply plugin: "java"
apply plugin: "robovm"
dependencies {
compile project(":core")
compile "org.robovm:robovm-rt:$roboVMVersion"
compile "org.robovm:robovm-cocoatouch:$roboVMVersion"
compile "org.robovm:robopods-google-mobile-ads-ios:$robopodsVersion-SNAPSHOT"
compile "org.robovm:robopods-google-apis-ios:$robopodsVersion-SNAPSHOT"
compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"
compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-ios"
}
}
project(":html") {
apply plugin: "gwt"
apply plugin: "war"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion:sources"
compile "com.badlogicgames.gdx:gdx-box2d-gwt:$gdxVersion:sources"
}
}
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
}
}
tasks.eclipse.doLast {
delete ".project"
}
dependencies {
}
Please Help and thanks in advance.
The problem is in your gradle files. First of all you are using the mobidevelop plugin with the official robovm. This might give problems.
then you are adding dependencies in 2 places. This should not do anything bad, but it is not needed and might cause problems if you change one of them.
Apply the following changes, rebuild gradle (dont forget to --refresh-dependencies) and rebuild your project. If it still fails clear cache again.
change:
classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.2.0-SNAPSHOT'
to
classpath 'org.robovm:robovm-gradle-plugin:1.14.0'
and
robopodsVersion = '1.13.1'
to
robopodsVersion = '1.14.0'
might also need to change:
gdxVersion = '1.9.2'
to
gdxVersion = '1.9.0'
You might also need to remove the "-SNAPSHOT" from the robopod version. not 100% sure it they exist (and if you would want those)
remove:
dependencies {
compile "org.robovm:robopods-google-mobile-ads-ios:1.13.1-SNAPSHOT"
compile "org.robovm:robopods-google-apis-ios:1.13.1-SNAPSHOT"
}
from ios build.gradle (these area already defined in you main build.gradle)
I use a Samsung Galaxy S7 for my tests.
I don't understand why I compile and launch my gluon Applications on my phone, it crash. I tried with the SingleViewProject and I have the same problem.
The last week, I didn't have this problem.
my grade file
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'org.javafxports:jfxmobile-plugin:1.0.8'
}
}
apply plugin: 'org.javafxports.jfxmobile'
repositories {
jcenter()
maven {
url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
}
}
mainClassName = 'com.gluonapplication.GluonApplication'
dependencies {
compile 'com.gluonhq:charm:2.1.1'
androidRuntime 'com.gluonhq:charm-android:2.1.1'
iosRuntime 'com.gluonhq:charm-ios:2.1.1'
desktopRuntime 'com.gluonhq:charm-desktop:2.1.1'
}
jfxmobile {
android {
manifest = 'src/android/AndroidManifest.xml'
androidSdk = "/Users/Alexandre/Library/Android/sdk"
}
ios {
infoPList = file('src/ios/Default-Info.plist')
forceLinkClasses = [
'com.gluonhq.**.*',
'io.datafx.**.*',
'javax.annotations.**.*',
'javax.inject.**.*',
'javax.json.**.*',
'org.glassfish.json.**.*'
]
}
}
The stacktrace
Process: com.gluonapplication, PID: 20944
java.lang.RuntimeException: Did not create correct launcher.
...
Caused by: java.lang.RuntimeException: Could not find /javafx.platform.properties on classpath.
Have you an idea to help me ?