chundongwang / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Can't build on Windows using JDK 1.6/1.7/1.8 #232

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?
Can't build on Windows using JDK 1.6/1.7/1.8

What is the exact smali/baksmali command that you ran?
gradlew.bat build

What version of smali/baksmali are you using? What rom are you working
from?
2.0.3

What is the airspeed velocity of an unladen swallow?

Please provide any additional information below: error messages, symptoms,
etc.
I have tried jdk1.8.0_25(64 bit)/jdk1.7.0_65(64 bit)/jdk1.6.0_45(32 bit), but 
all of them give me the same error message like below
E:\code\android\smali>gradlew.bat build
:util:compileJava UP-TO-DATE
:util:processResources UP-TO-DATE
:util:classes UP-TO-DATE
:util:jar UP-TO-DATE
:dexlib2:compileJava
E:\code\android\smali\dexlib2\src\main\java\org\jf\dexlib2\writer\builder\Builde
rClassDef.java:83: e
rror: no suitable method found for copyOf(Iterable<CAP#1>)
        this.staticFields = ImmutableSortedSet.copyOf(Iterables.filter(fields, FieldUtil.FIELD_IS_ST
ATIC));
                                              ^
    method ImmutableSet.<E#1>copyOf(E#1[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#1[])
    method ImmutableSet.<E#2>copyOf(Iterable<? extends E#2>) is not applicable
      (cannot infer type-variable(s) E#2,T
        (argument mismatch; Iterable<CAP#2> cannot be converted to Iterable<? extends CAP#2>))
    method ImmutableSet.<E#3>copyOf(Iterator<? extends E#3>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Iterator<? extends
 E#3>)
    method ImmutableSet.<E#4>copyOf(Collection<? extends E#4>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Collection<? exten
ds E#4>)
    method ImmutableSortedSetFauxverideShim.<E#5>copyOf(E#5[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#5[])
    method ImmutableSortedSet.<E#6>copyOf(E#6[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#6[])
    method ImmutableSortedSet.<E#7>copyOf(Iterable<? extends E#7>) is not applicable
      (cannot infer type-variable(s) E#7,T
        (argument mismatch; Iterable<CAP#3> cannot be converted to Iterable<? extends CAP#3>))
    method ImmutableSortedSet.<E#8>copyOf(Collection<? extends E#8>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Collection<? exten
ds E#8>)
    method ImmutableSortedSet.<E#9>copyOf(Iterator<? extends E#9>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Iterator<? extends
 E#9>)
    method ImmutableSortedSet.<E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>) is not
 applicable
      (cannot infer type-variable(s) E#10
        (actual and formal argument lists differ in length))
    method ImmutableSortedSet.<E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>) is not
 applicable
      (cannot infer type-variable(s) E#11
        (actual and formal argument lists differ in length))
    method ImmutableSortedSet.<E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>) is n
ot applicable
      (cannot infer type-variable(s) E#12
        (actual and formal argument lists differ in length))
  where E#1,T,E#2,E#3,E#4,E#5,E#6,E#7,E#8,E#9,E#10,E#11,E#12 are type-variables:
    E#1 extends Object declared in method <E#1>copyOf(E#1[])
    T extends Object declared in method <T>filter(Iterable<T>,Predicate<? super T>)
    E#2 extends Object declared in method <E#2>copyOf(Iterable<? extends E#2>)
    E#3 extends Object declared in method <E#3>copyOf(Iterator<? extends E#3>)
    E#4 extends Object declared in method <E#4>copyOf(Collection<? extends E#4>)
    E#5 extends Object declared in method <E#5>copyOf(E#5[])
    E#6 extends Comparable<? super E#6> declared in method <E#6>copyOf(E#6[])
    E#7 extends Object declared in method <E#7>copyOf(Iterable<? extends E#7>)
    E#8 extends Object declared in method <E#8>copyOf(Collection<? extends E#8>)
    E#9 extends Object declared in method <E#9>copyOf(Iterator<? extends E#9>)
    E#10 extends Object declared in method <E#10>copyOf(Comparator<? super E#10>,Iterator<? extends
E#10>)
    E#11 extends Object declared in method <E#11>copyOf(Comparator<? super E#11>,Iterable<? extends
E#11>)
    E#12 extends Object declared in method <E#12>copyOf(Comparator<? super E#12>,Collection<? extend
s E#12>)
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:
    CAP#1 extends BuilderField from capture of ? extends BuilderField
    CAP#2 extends BuilderField from capture of ? extends BuilderField
    CAP#3 extends BuilderField from capture of ? extends BuilderField
E:\code\android\smali\dexlib2\src\main\java\org\jf\dexlib2\writer\builder\Builde
rClassDef.java:84: e
rror: no suitable method found for copyOf(Iterable<CAP#1>)
        this.instanceFields = ImmutableSortedSet.copyOf(Iterables.filter(fields, FieldUtil.FIELD_IS_
INSTANCE));
                                                ^
    method ImmutableSet.<E#1>copyOf(E#1[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#1[])
    method ImmutableSet.<E#2>copyOf(Iterable<? extends E#2>) is not applicable
      (cannot infer type-variable(s) E#2,T
        (argument mismatch; Iterable<CAP#2> cannot be converted to Iterable<? extends CAP#2>))
    method ImmutableSet.<E#3>copyOf(Iterator<? extends E#3>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Iterator<? extends
 E#3>)
    method ImmutableSet.<E#4>copyOf(Collection<? extends E#4>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Collection<? exten
ds E#4>)
    method ImmutableSortedSetFauxverideShim.<E#5>copyOf(E#5[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#5[])
    method ImmutableSortedSet.<E#6>copyOf(E#6[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#6[])
    method ImmutableSortedSet.<E#7>copyOf(Iterable<? extends E#7>) is not applicable
      (cannot infer type-variable(s) E#7,T
        (argument mismatch; Iterable<CAP#3> cannot be converted to Iterable<? extends CAP#3>))
    method ImmutableSortedSet.<E#8>copyOf(Collection<? extends E#8>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Collection<? exten
ds E#8>)
    method ImmutableSortedSet.<E#9>copyOf(Iterator<? extends E#9>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Iterator<? extends
 E#9>)
    method ImmutableSortedSet.<E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>) is not
 applicable
      (cannot infer type-variable(s) E#10
        (actual and formal argument lists differ in length))
    method ImmutableSortedSet.<E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>) is not
 applicable
      (cannot infer type-variable(s) E#11
        (actual and formal argument lists differ in length))
    method ImmutableSortedSet.<E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>) is n
ot applicable
      (cannot infer type-variable(s) E#12
        (actual and formal argument lists differ in length))
  where E#1,T,E#2,E#3,E#4,E#5,E#6,E#7,E#8,E#9,E#10,E#11,E#12 are type-variables:
    E#1 extends Object declared in method <E#1>copyOf(E#1[])
    T extends Object declared in method <T>filter(Iterable<T>,Predicate<? super T>)
    E#2 extends Object declared in method <E#2>copyOf(Iterable<? extends E#2>)
    E#3 extends Object declared in method <E#3>copyOf(Iterator<? extends E#3>)
    E#4 extends Object declared in method <E#4>copyOf(Collection<? extends E#4>)
    E#5 extends Object declared in method <E#5>copyOf(E#5[])
    E#6 extends Comparable<? super E#6> declared in method <E#6>copyOf(E#6[])
    E#7 extends Object declared in method <E#7>copyOf(Iterable<? extends E#7>)
    E#8 extends Object declared in method <E#8>copyOf(Collection<? extends E#8>)
    E#9 extends Object declared in method <E#9>copyOf(Iterator<? extends E#9>)
    E#10 extends Object declared in method <E#10>copyOf(Comparator<? super E#10>,Iterator<? extends
E#10>)
    E#11 extends Object declared in method <E#11>copyOf(Comparator<? super E#11>,Iterable<? extends
E#11>)
    E#12 extends Object declared in method <E#12>copyOf(Comparator<? super E#12>,Collection<? extend
s E#12>)
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:
    CAP#1 extends BuilderField from capture of ? extends BuilderField
    CAP#2 extends BuilderField from capture of ? extends BuilderField
    CAP#3 extends BuilderField from capture of ? extends BuilderField
E:\code\android\smali\dexlib2\src\main\java\org\jf\dexlib2\writer\builder\Builde
rClassDef.java:85: e
rror: no suitable method found for copyOf(Iterable<CAP#1>)
        this.directMethods = ImmutableSortedSet.copyOf(Iterables.filter(methods, MethodUtil.METHOD_I
S_DIRECT));
                                               ^
    method ImmutableSet.<E#1>copyOf(E#1[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#1[])
    method ImmutableSet.<E#2>copyOf(Iterable<? extends E#2>) is not applicable
      (cannot infer type-variable(s) E#2,T
        (argument mismatch; Iterable<CAP#2> cannot be converted to Iterable<? extends CAP#2>))
    method ImmutableSet.<E#3>copyOf(Iterator<? extends E#3>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Iterator<? extends
 E#3>)
    method ImmutableSet.<E#4>copyOf(Collection<? extends E#4>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Collection<? exten
ds E#4>)
    method ImmutableSortedSetFauxverideShim.<E#5>copyOf(E#5[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#5[])
    method ImmutableSortedSet.<E#6>copyOf(E#6[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#6[])
    method ImmutableSortedSet.<E#7>copyOf(Iterable<? extends E#7>) is not applicable
      (cannot infer type-variable(s) E#7,T
        (argument mismatch; Iterable<CAP#3> cannot be converted to Iterable<? extends CAP#3>))
    method ImmutableSortedSet.<E#8>copyOf(Collection<? extends E#8>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Collection<? exten
ds E#8>)
    method ImmutableSortedSet.<E#9>copyOf(Iterator<? extends E#9>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Iterator<? extends
 E#9>)
    method ImmutableSortedSet.<E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>) is not
 applicable
      (cannot infer type-variable(s) E#10
        (actual and formal argument lists differ in length))
    method ImmutableSortedSet.<E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>) is not
 applicable
      (cannot infer type-variable(s) E#11
        (actual and formal argument lists differ in length))
    method ImmutableSortedSet.<E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>) is n
ot applicable
      (cannot infer type-variable(s) E#12
        (actual and formal argument lists differ in length))
  where E#1,T,E#2,E#3,E#4,E#5,E#6,E#7,E#8,E#9,E#10,E#11,E#12 are type-variables:
    E#1 extends Object declared in method <E#1>copyOf(E#1[])
    T extends Object declared in method <T>filter(Iterable<T>,Predicate<? super T>)
    E#2 extends Object declared in method <E#2>copyOf(Iterable<? extends E#2>)
    E#3 extends Object declared in method <E#3>copyOf(Iterator<? extends E#3>)
    E#4 extends Object declared in method <E#4>copyOf(Collection<? extends E#4>)
    E#5 extends Object declared in method <E#5>copyOf(E#5[])
    E#6 extends Comparable<? super E#6> declared in method <E#6>copyOf(E#6[])
    E#7 extends Object declared in method <E#7>copyOf(Iterable<? extends E#7>)
    E#8 extends Object declared in method <E#8>copyOf(Collection<? extends E#8>)
    E#9 extends Object declared in method <E#9>copyOf(Iterator<? extends E#9>)
    E#10 extends Object declared in method <E#10>copyOf(Comparator<? super E#10>,Iterator<? extends
E#10>)
    E#11 extends Object declared in method <E#11>copyOf(Comparator<? super E#11>,Iterable<? extends
E#11>)
    E#12 extends Object declared in method <E#12>copyOf(Comparator<? super E#12>,Collection<? extend
s E#12>)
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:
    CAP#1 extends BuilderMethod from capture of ? extends BuilderMethod
    CAP#2 extends BuilderMethod from capture of ? extends BuilderMethod
    CAP#3 extends BuilderMethod from capture of ? extends BuilderMethod
E:\code\android\smali\dexlib2\src\main\java\org\jf\dexlib2\writer\builder\Builde
rClassDef.java:86: e
rror: no suitable method found for copyOf(Iterable<CAP#1>)
        this.virtualMethods = ImmutableSortedSet.copyOf(Iterables.filter(methods, MethodUtil.METHOD_
IS_VIRTUAL));
                                                ^
    method ImmutableSet.<E#1>copyOf(E#1[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#1[])
    method ImmutableSet.<E#2>copyOf(Iterable<? extends E#2>) is not applicable
      (cannot infer type-variable(s) E#2,T
        (argument mismatch; Iterable<CAP#2> cannot be converted to Iterable<? extends CAP#2>))
    method ImmutableSet.<E#3>copyOf(Iterator<? extends E#3>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Iterator<? extends
 E#3>)
    method ImmutableSet.<E#4>copyOf(Collection<? extends E#4>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Collection<? exten
ds E#4>)
    method ImmutableSortedSetFauxverideShim.<E#5>copyOf(E#5[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#5[])
    method ImmutableSortedSet.<E#6>copyOf(E#6[]) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to E#6[])
    method ImmutableSortedSet.<E#7>copyOf(Iterable<? extends E#7>) is not applicable
      (cannot infer type-variable(s) E#7,T
        (argument mismatch; Iterable<CAP#3> cannot be converted to Iterable<? extends CAP#3>))
    method ImmutableSortedSet.<E#8>copyOf(Collection<? extends E#8>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Collection<? exten
ds E#8>)
    method ImmutableSortedSet.<E#9>copyOf(Iterator<? extends E#9>) is not applicable
      (no instance(s) of type variable(s) T exist so that Iterable<T> conforms to Iterator<? extends
 E#9>)
    method ImmutableSortedSet.<E#10>copyOf(Comparator<? super E#10>,Iterator<? extends E#10>) is not
 applicable
      (cannot infer type-variable(s) E#10
        (actual and formal argument lists differ in length))
    method ImmutableSortedSet.<E#11>copyOf(Comparator<? super E#11>,Iterable<? extends E#11>) is not
 applicable
      (cannot infer type-variable(s) E#11
        (actual and formal argument lists differ in length))
    method ImmutableSortedSet.<E#12>copyOf(Comparator<? super E#12>,Collection<? extends E#12>) is n
ot applicable
      (cannot infer type-variable(s) E#12
        (actual and formal argument lists differ in length))
  where E#1,T,E#2,E#3,E#4,E#5,E#6,E#7,E#8,E#9,E#10,E#11,E#12 are type-variables:
    E#1 extends Object declared in method <E#1>copyOf(E#1[])
    T extends Object declared in method <T>filter(Iterable<T>,Predicate<? super T>)
    E#2 extends Object declared in method <E#2>copyOf(Iterable<? extends E#2>)
    E#3 extends Object declared in method <E#3>copyOf(Iterator<? extends E#3>)
    E#4 extends Object declared in method <E#4>copyOf(Collection<? extends E#4>)
    E#5 extends Object declared in method <E#5>copyOf(E#5[])
    E#6 extends Comparable<? super E#6> declared in method <E#6>copyOf(E#6[])
    E#7 extends Object declared in method <E#7>copyOf(Iterable<? extends E#7>)
    E#8 extends Object declared in method <E#8>copyOf(Collection<? extends E#8>)
    E#9 extends Object declared in method <E#9>copyOf(Iterator<? extends E#9>)
    E#10 extends Object declared in method <E#10>copyOf(Comparator<? super E#10>,Iterator<? extends
E#10>)
    E#11 extends Object declared in method <E#11>copyOf(Comparator<? super E#11>,Iterable<? extends
E#11>)
    E#12 extends Object declared in method <E#12>copyOf(Comparator<? super E#12>,Collection<? extend
s E#12>)
  where CAP#1,CAP#2,CAP#3 are fresh type-variables:
    CAP#1 extends BuilderMethod from capture of ? extends BuilderMethod
    CAP#2 extends BuilderMethod from capture of ? extends BuilderMethod
    CAP#3 extends BuilderMethod from capture of ? extends BuilderMethod
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
4 errors
:dexlib2:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':dexlib2:compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more l
og output.

BUILD FAILED

Total time: 23.252 secs

E:\code\android\smali>

Original issue reported on code.google.com by liudongh...@gmail.com on 21 Dec 2014 at 8:24

GoogleCodeExporter commented 9 years ago
Unfortunately, I can't test compilation on windows. If you want to investigate 
and send a patch, I'd be happy to take a look :)

Original comment by jesusfreke@jesusfreke.com on 28 Dec 2014 at 8:19

GoogleCodeExporter commented 9 years ago
Note: Some issues related to compiling with java 1.8 have been fixed

Original comment by jesusfreke@jesusfreke.com on 28 Dec 2014 at 10:17