问题
i have the exact same problem here with the different that
when i added vuforia wrapper unity application got crashed before lunching
if i didn't add vuforia wrapper the unity app open and behave normally but with black screen instead of camera
Unity (Vuforia) project integrated in Android project shows a black screen on startup
Unity Version: 2018.3.6f1
Vuforia version: 8.1.7
Android APP Gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.myfit"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
implementation(name: 'DressAR-debug', ext:'aar')
implementation(name: 'VuforiaWrapper', ext:'aar')
}
Unity APP Gradle
// GENERATED BY UNITY. REMOVE THIS COMMENT TO PREVENT OVERWRITING WHEN EXPORTING AGAIN
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
}
}
allprojects {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}
}
apply plugin: 'com.android.library'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation(name: 'VuforiaWrapper', ext:'aar')
}
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 16
targetSdkVersion 28
ndk {
abiFilters 'armeabi-v7a', 'x86'
}
versionCode 1
versionName '0.1'
}
lintOptions {
abortOnError false
}
aaptOptions {
noCompress = ['.unity3d', '.ress', '.resource', '.obb']
}
buildTypes {
debug {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
jniDebuggable true
}
release {
minifyEnabled false
useProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-unity.txt'
signingConfig signingConfigs.debug
}
}
packagingOptions {
doNotStrip '*/armeabi-v7a/*.so'
doNotStrip '*/x86/*.so'
}
}
回答1:
I have the same error with you I have searched for a lot of tutorials and I found this post and it worked on my project, good luck
No implementation found for void com.unity3d.player.UnityPlayer.nativeRestartActivityIndicator()
- Open Unity Build Setting
- In android player settings change "scripting backend" to IL2CPP.
- In android player settings mark ARM64 checkbox as selected.
- Then export again.
来源:https://stackoverflow.com/questions/55515688/unity-vuforia-embedded-within-android-app