Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Sablyu · Jun 18, 2015 at 06:54 PM · unity 5android buildfacebook

Package com.unity3d.player does not exist

I tried to make Android (google) project from Unity (to obfuscate some dlls and then make apk by hands).

My project uses facebook sdk. The problem is to make project without this error in facebook source files: "package com.unity3d.player does not exist".

It happens on:

 import com.unity3d.player.UnityPlayer;

I can't figure out how to solve this issue. What do I do wrong? any facebook settings wrong? missing some libraries? what is going on?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

2 Replies

· Add your reply
  • Sort: 
avatar image
3
Best Answer

Answer by rumaniel · Jun 19, 2015 at 06:32 AM

Have u check Java Build Path in Eclipse Properties?

In Unity3d Editor, Plugin/Android folder doesn't contain 'classes.jar'(maybe?) but Expoerted project should added 'classes.jar'.

So you need Add jar path in Eclipse or Android Studio project settings.

It also contains bolts.jar or android-support-v4.jar in java build path.

unity classes.jar path are in

(Win path) C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\androidplayer\bin\classes.jar

(Mac path) Unity.app(show packages)\Contents\PlaybackEngine\AndroidPlayer\bin\classes.jar

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sablyu · Jun 19, 2015 at 06:43 AM 0
Share

classes.jar contains in "facebook\bin" folder

bolts-android-1.1.2.jar and android-support-v4.jar contains in project module in "[project name]\libs" folder (but facebook module doesn't get it, so it can't resolve referencies) Do I have to copy that files into facebook module?

may be something wrong with my manifest??? I use Android Studio, but can try to export project to Eclipse.

avatar image Sablyu · Jun 19, 2015 at 06:51 AM 0
Share

I checked project's JD$$anonymous$$ paths is O$$anonymous$$

I added bolts-android-1.1.2.jar and android-support-v4.jar for facebook module from [my project] module, added file dependencies => then 82 errors about missing references disappeared. THX a lot for your hint!

Now I have the only 19 errors: package com.unity3d.player doesn't exist and cannot find symbol variable UnityPlayer

avatar image rumaniel · Jun 19, 2015 at 07:08 AM 0
Share

$$anonymous$$aybe manifest is ok.

Bin folder contains complied files. So that is maybe not Unity3d clasess files.

So you should copy unity claesses.jar file to your project.

I don't know how Android Studio works. but you can make a dependency both project with jar file.

Java Build Path means where locate jar file path ;) not JD$$anonymous$$. It's na$$anonymous$$g of eclipse's feature.

avatar image Sablyu · Jun 19, 2015 at 07:29 AM 0
Share

THX!!! I made a copy of unity classes file and it solved my problem!

avatar image
0

Answer by Yury-Habets · Jun 18, 2015 at 08:07 PM

You seem to be missing Unity's classes.jar file (should be present if you export the project from the Editor).

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sablyu · Jun 19, 2015 at 04:34 AM 0
Share

nope, classes.jar exists in project. I think the problem can be solved by adding some dependency. There were missing 2 dependencies (com.parse.bolts and com.android.support) in facebook module after Unity compilation, so, I think facebook module lack of one more :(

avatar image rumaniel · Jun 19, 2015 at 05:55 AM 0
Share

Check Assets/Plugin/Android/facebookSD$$anonymous$$(or something facebook sdk project path)/libs/

It should contains bolts.jar and android support jar.

avatar image Sablyu · Jun 19, 2015 at 06:08 AM 0
Share

It should contains bolts.jar and android support jar.

Project contains them, but in built Android projects I can't find them, so I added dependencies com.parse.bolts and com.android.support. There is one unsolved problem with import com.unity3d.player -> missing UnityPlayer reference

avatar image rumaniel · Jun 19, 2015 at 06:19 AM 0
Share

Exported Android project should have claasess.jar in ProjectPath/

If you are using Eclipse, Check Eclipse -> Project Properties -> Jave Build Path -> Libraries. If there are no path in classes.jar, then you should add classes.jar file.

It makes dependency jar file on your project.

You can find classes.jar in

(win32) C:\Program Files (x86)\Unity\Editor\Data\PlaybackEngines\androidplayer\bin\classes.jar

(mac) Unity.app (Show Packages)\Contents\PlaybackEngine\AndroidPlayer\bin\classes.jar

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

4 People are following this question.

avatar image avatar image avatar image avatar image

Related Questions

CommandInvokationFailure: Failed to re-package resources. 0 Answers

Building an IOS app with Facebook SDK integration 2 Answers

How come when I generate a signed APK it produces out a JKS file? 0 Answers

How to setup android keystore in unity cloud build? 0 Answers

Unity Android Build Error,Build Faild with unity editor 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges