When I try to run example (CurencyConverter) I have this message in IDE and black screen in simulator.
How can I fix it?
Dear Vadym_Dragych,
are you using the samples from here? https://github.com/multi-os-engine/moe-samples-java/tree/moe-1.1.0
The message means, that the class which is implementing the UIApplicationDelegate interface does not contain some required code:
private UIWindow window;
@Override
public void setWindow(UIWindow value) {
window = value;
}
@Override
public UIWindow window() {
return window;
}
But this can be found in that sample. Did you make any modifications to the sample or build settings?
No I didn’t. And it’s exists in example. If I run it in debug mode method setWindow never call.
I add “proguardLevel ‘all’” to moe section in gradle file to make it compile otherwise I get compile error
dex2oat I 7965 204805 /Volumes/SSD/gh-moe-master/aosp/art/dex2oat/dex2oat.cc:2220] /Users/vadim/.moe/moe-sdk-1.1.0/tools/dex2oat --instruction-set=x86 --base=0x40000000 --compiler-backend=Quick --generate-debug-info --image=/Users/vadim/moe-samples-java-moe-1.1.0/Calculator/ios/build/moe/main/dex2oat/debug-x86/image.art --image-classes=/Users/vadim/.moe/moe-sdk-1.1.0/tools/preloaded-classes --oat-file=/Users/vadim/moe-samples-java-moe-1.1.0/Calculator/ios/build/moe/main/dex2oat/debug-x86/application.oat --dex-file=/Users/vadim/moe-samples-java-moe-1.1.0/Calculator/ios/build/moe/main/dex/classes.jar:/Users/vadim/.moe/moe-sdk-1.1.0/sdk/moe-ios-retro-dex.jar:/Users/vadim/.moe/moe-sdk-1.1.0/sdk/moe-core.dex
dex2oat I 7965 204805 /Volumes/SSD/gh-moe-master/aosp/art/runtime/parsed_options.cc:449] setting boot class path to /Users/vadim/moe-samples-java-moe-1.1.0/Calculator/ios/build/moe/main/dex/classes.jar:/Users/vadim/.moe/moe-sdk-1.1.0/sdk/moe-ios-retro-dex.jar:/Users/vadim/.moe/moe-sdk-1.1.0/sdk/moe-core.dex
dex2oat W 7965 204813 /Volumes/SSD/gh-moe-master/aosp/art/compiler/dex/verification_results.cc:61] Method processed more than once: void android.icu.text.NumberFormat.()
dex2oat W 7965 204813 /Volumes/SSD/gh-moe-master/aosp/art/compiler/dex/verification_results.cc:61] Method processed more than once: java.lang.String java.lang.AbstractStringBuilder.substring(int)
dex2oat W 7965 204813 /Volumes/SSD/gh-moe-master/aosp/art/compiler/dex/verification_results.cc:61] Method processed more than once: java.lang.String com.android.org.bouncycastle.util.Strings.toLowerCase(java.lang.String)
dex2oat W 7965 204813 /Volumes/SSD/gh-moe-master/aosp/art/compiler/dex/verification_results.cc:61] Method processed more than once: java.lang.String java.lang.IntegralToString.stringOf(char[])
dex2oat I 7965 204805 /Volumes/SSD/gh-moe-master/aosp/art/runtime/gc/heap.cc:2714] Explicit concurrent mark sweep GC freed 14861(1605KB) AllocSpace objects, 0(0B) LOS objects, 54% free, 3MB/7MB, paused 22us total 5.118ms
dex2oat F 7965 204805 /Volumes/SSD/gh-moe-master/aosp/art/compiler/oat_writer.cc:645]Unexpected failure to resolve a method: void org.moe.samples.calculator.ios.CalcViewController.()dex2oat F 7965 204805 /Volumes/SSD/gh-moe-master/aosp/art/compiler/oat_writer.cc:650] java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
dex2oat F 7965 204805 /Volumes/SSD/gh-moe-master/aosp/art/compiler/oat_writer.cc:650] (Throwable with empty stack trace)
dex2oat F 7965 204805 /Volumes/SSD/gh-moe-master/aosp/art/runtime/runtime.cc:450]Runtime aborting…
Aborting thread:
“main” prio=5 tid=1 Runnable (still starting up)
| group="" sCount=0 dsCount=0 obj=0x0 self=0x7fe8ab800000
| sysTid=204805 nice=-1 cgrp=default sched=1/31 handle=0x7fff7a6e7000
| state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7fff539d1000-0x7fff539d9000 stackSize=8MB
| held mutexes= “abort lock” “mutator lock”(shared held)
(no managed stack frames)
Pending exception java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
(Throwable with empty stack trace)Dumping all threads without appropriate locks held: thread list lock
All threads:
DALVIK THREADS (1):
“main” prio=5 tid=1 Runnable (still starting up)
| group="" sCount=0 dsCount=0 obj=0x0 self=0x7fe8ab800000
| sysTid=204805 nice=-1 cgrp=default sched=1/31 handle=0x7fff7a6e7000
| state=? schedstat=( 0 0 0 ) utm=0 stm=0 core=0 HZ=100
| stack=0x7fff539d1000-0x7fff539d9000 stackSize=8MB
| held mutexes= “abort lock” “mutator lock”(shared held)
(no managed stack frames)
dex2oat W 7965 204805 /Volumes/SSD/gh-moe-master/aosp/art/runtime/barrier.cc:96] Attempted to destroy barrier with non zero count -1
FAILED
FAILURE: Build failed with an exception.
Dear Vadym_Dragych,
adding proguardLevel ‘all’ does explain why you have this failure, add a proguard.append.cfg
file into your MOE module’s directory with the following contents:
-keep class ios.uikit.protocol.UIApplicationDelegate { *; }
But the log you sent makes no sense with this sample, dex2oat failed on org.moe.samples.calculator.ios.CalcViewController
class, but that class is in a different sample (Calculator).
Add proguard.append.cfg solve problem. Many thanks.