Ali
Ali

Reputation: 539

Error in adding Pushe unity plugin to my android app

When I want to add pushe unity plugin to my app I saw the following error.

Anybody know whats going wrong?

Failed to compile resources with the following parameters:  
-bootclasspath ".../UNITY/android-sdk\platforms\android-21\android.jar" -d
"..\unity-sample-master\Temp\StagingArea\bin\classes" -source 1.6 -target 1.6 -encoding UTF-8
"co\ronash\pushe\Manifest.java"
"co\ronash\pushe\R.java"
"com\google \android\gms\Manifest.java"
"com\google\android\gms\R.java"
"com\google\android\gms \base\Manifest.java"
"com\google\android\gms\base\R.java"
warning: [options] source value 1.6 is obsolete and will be removed in a future release
warning: [options] target value 1.6 is obsolete and will be removed in a future release
warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.

3 warnings
UnityEditor.HostView:OnGUI()

Upvotes: 1

Views: 230

Answers (2)

Yuri Dogandjiev
Yuri Dogandjiev

Reputation: 208

I ran into this issue as well. I tried "changing the java version which unity uses to 1.8" as the previous answer suggested but couldn't find any option to do so in the External tools menu. I also tried figuring out how to append the "-Xlint:-options" parameter suggested in the error spew but couldn't find the right place to set this and it seemed like a hack to begin with.

The only solution I found was to downgrade from JDK 9 to JDK 8. You will also need to update the JDK path in Unity from Edit -> Preferences -> External tools.

My JDK path changed from:

/Library/Java/JavaVirtualMachines/jdk-9.jdk/Contents/Home

To:

/Library/Java/JavaVirtualMachines/jdk1.8.0_144.jdk/Contents/Home

Upvotes: 1

vahid amintabar
vahid amintabar

Reputation: 56

It seems that your unity is using java 1.6 for compiling your project.

According to my experience, unity 5 needs java 1.8 or higher. This applies to most recent unity plugins which are built with recent versions of unity, including Pushe plugin.

So try changing the java version which your unity uses to 1.8 or above following below path:

Edit -> Preferences -> External tools

Hope it helps.

Upvotes: 4

Related Questions