は最近、私はvuforiaとlibGDXの統合に興味を持ちました。私は以前の仕事を制御していたが、彼らのどれもが正しく働いていなかったし、初心者はアンドロイドとグラブルの問題に初心者だった。一番うまくいったのは、デーモンタスだった。だけvuforiaのlibgdxの彼の古いバージョンではvuforiaでターゲットを追跡するために、もはやサポートされる予定されていない仕事をしていました。私は私のプロジェクトにvuforia 5.5を実装する必要があります。VuforiaとLibGDXを一緒にセットアップするには?
私はその後もvuforai.jarとそのエンジンを追加して、https://github.com/daemontus/VuforiaLibGDXコードをダウンロードしています。 soからエンジンを変更することにより、アンドロイドでルートフォルダをインポートし、ライブラリのフォルダのlibにvuforiaとエンジンをコピーした(ので、最初のzipファイル、その後ジャーに拡張子を変更を含むフォルダを作る)jarファイルにファイルを入力スタジオ。次に、アンドロイドスタイルをプロジェクトスタイルに変更して、ライブラリが適切な場所にあることを確認します。私は右クリックしてプロジェクトをクリックし、モジュールの設定を開き、次にアプリケーションタブで依存関係を開き、依存関係リストに新しいvuforiaとそのエンジンを追加しました。また、NDKが存在することを確認しました。 私はそれのための解決策を見つけることができないようだgradlesについては、このエラーが出る:
Error:(53, 0) Gradle DSL method not found: 'compile()' Possible causes:
プロジェクトのVuforiaLibGDX-マスターは 'メソッドが含まれていないのGradleのバージョンを使用することができます。 Open Gradleラッパーファイル ビルドファイルにGradleプラグインがない可能性があります。私はここで語った手順のように働いていたのGradleプラグインに
原因最新vuforiaサンプルを適用します 。私は途中でWindows 10を使用しています。 はまた、私は、しかし、私は依存関係に追加している見つかりませんでしたvuforiaインポート場所に気づきました。 import com。 vuforia .Matrix44F。
build.gradleプロジェクト:あなたはすべてのサブプロジェクト/モジュールに共通の設定オプションを追加することができます
//トップレベルのビルドファイル。
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
}
}
allprojects {
repositories {
mavenCentral()
}
}
Build.gradle.App:
apply plugin: 'com.android.application'
def VUFORIA_SDK_DIR = '/Users/daemontus/Library/Vuforia'
def NATIVE_LIB_DIR = 'build/lib'
def JAR_DIR = 'build/java/vuforia'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
sourceSets.main {
jni.srcDirs = []
jniLibs.srcDirs = ["$VUFORIA_SDK_DIR/$NATIVE_LIB_DIR/", "lib/"]
}
defaultConfig {
applicationId "com.github.daemontus.renderer"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
archivesBaseName = rootProject.projectDir.getName()
buildTypes {
release {
minifyEnabled false
ndk {
abiFilters "armeabi-v7a"
}
}
debug {
minifyEnabled false
debuggable true
ndk {
abiFilters "armeabi-v7a"
}
}
}
}
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
ext {
gdxVersion = '1.9.3'
}
dependencies {
compile 'com.android.support:appcompat-v7:23.+'
compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion" compile files('lib/vEngine.jar')
compile files('lib/Vuforia.jar')
compile files('lib/vEngine.jar')
}
また
私はこのような何かに自分のGradleを変更しましたが、その動作していない原因のvuforiaパッケージが見つからない場合: を私もこのような私のGradleを変更しましたそれでもvuforiaが見つかりません。
apply plugin: 'com.android.application'
def VUFORIA_SDK_DIR = 'C:\\Dev\\vuforia-sdk-android-5-5-9'
def NATIVE_LIB_DIR = 'build/lib'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
sourceSets.main {
jni.srcDirs = []
jniLibs.srcDirs = ["$VUFORIA_SDK_DIR/$NATIVE_LIB_DIR/", "lib/"]
}
defaultConfig {
applicationId "com.github.daemontus.renderer"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
archivesBaseName = rootProject.projectDir.getName()
buildTypes {
release {
minifyEnabled false
ndk {
abiFilters "armeabi-v7a"
}
}
debug {
minifyEnabled false
debuggable true
ndk {
abiFilters "armeabi-v7a"
}
}
}
}
repositories {
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
ext {
gdxVersion = '1.9.3'
}
dependencies {
compile 'com.android.support:appcompat-v7:23.+'
compile fileTree(include: '*.jar', dir: 'libs')
compile files('libs/vuforia.jar')
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
}
エラー:(16、19)エラー:パッケージcom.vuforiaが
存在しないが