0

First post ever, here we go:

So I had the luck of getting an internship at a company that builds and maintain apps for eateries. I have been stuck for about 3 weeks now on just getting that app to run in my emulator (embarrassing af). I've looked up many solutions but none have worked, the best help came from this top answer in the form of a guide to which I've combined steps with Sromku's setup guide for simpleFacebook on Eclipse (https://github.com/sromku/android-simple-facebook/wiki/Setup-project), but I'm still having issues. The errors that pop up are pretty similar whether running in Windows or Mac, so I am pretty sure I am overlooking something really stupid.

I forgot to mentioned I am restricted to using Eclipse, even though Android Studio is the recommended IDE the company is pretty set on Eclipse.

I wish I could upload pictures, stackoverflow won't let me upload images until I have at least 10 rep >.<

Common Errors I am getting are :

The container 'Android Dependencies' references non existing library ' ../..main\bin\main.jar'
Project cannot be built until build path errors are resolved

and upon cleaning the project

AsyncFacebookRunner cannot be resolved to a type

along with a bunch of error facebook related errors, about 100 in total. I've tried everything and am out of ideas, having tried the most common solutions and even in different variations, cleaning/rebuilding/&organizing imports.

SO my question: what could I be overloooking?

/end

EDIT Here is a directory with images of each project's properties screens and workspace:

EDIT 2 Also here is a snippet of one class with errors in case it helps. I see errors on 'private Facebook facbook' & 'private AsyncFacebookRunner mAsyncRunner' where Eclipse says it cannot be resolved to a type.

package com.ak.app.neckter.activity;

import org.json.JSONObject;

import com.akl.zoes.kitchen.util.AppConstants;
import com.akl.zoes.kitchen.util.WebHTTPMethodClass;

import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.os.AsyncTask;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ShareStashActivity extends Activity {

    // Your Facebook APP ID
    private static String APP_ID = "472137856222590"; // Replace your App ID
    // here

    // Instance of Facebook Class
    private Facebook facebook;
    private AsyncFacebookRunner mAsyncRunner;
    String FILENAME = "AndroidSSO_data";
    private SharedPreferences mPrefs;

    static AlertDialog.Builder alertDialogBuilder;
    SharedPreferences mPreference;

    public SharedPreferences getPreference() {
        return mPreference;
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_share_stash);
        mPreference = PreferenceManager.getDefaultSharedPreferences(this);
        Button shareViaFacebook = (Button) findViewById(R.id.shareViaFacebook);
        Button shareViaTwitter = (Button) findViewById(R.id.shareViaTwitter);
        facebook = new Facebook(APP_ID);
        mAsyncRunner = new AsyncFacebookRunner(facebook);
        shareViaFacebook.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                // if (!isAppInstalled("com.facebook.katana"))
                // ShareStashActivity
                // .showMessageDialog("Please install facebook!",
                // ShareStashActivity.this);
                // else {
                loginToFacebook();
                // new fetchReferralRequestServer().execute("");
                // }
            }
        });

        shareViaTwitter.setOnClickListener(new OnClickListener() {

            @Override
            public void onClick(View v) {
                if (!isAppInstalled("com.twitter.android"))
                    ShareStashActivity.showMessageDialog(
                            "Please install twitter!", ShareStashActivity.this);
                else {

                }
            }
        });
    }

}

EDIT 3 On restarting Eclipse I now get these error messages

The container 'Android Dependencies' references non existing library 'E:\Drive\Relevant\WindowsEclipseWorkspace\facebook\bin\facebook.jar' main Build path Build Path Problem

The container 'Android Dependencies' references non existing library 'E:\Drive\Relevant\WindowsEclipseWorkspace\main\bin\main.jar' Rotiapp Build path Build Path Problem

The project cannot be built until build path errors are resolved Rotiapp Unknown Java Problem

The project cannot be built until build path errors are resolved main Unknown Java Problem

When I individually build facebook project or simplefacebook to create a .jar file, the facebook project reverts to java compiler 1.6. When I switch back to 1.7, I end up with errors saying R cannot be resolved to a variable. All I want is to get this emulation to run successfully!

Community
  • 1
  • 1
  • We can't help you without snippets of your code that are creating these errors. Please check out this link which describes how to write a 'good' question: http://stackoverflow.com/help/mcve – Grade 'Eh' Bacon Jul 23 '15 at 17:27

1 Answers1

0

Figured it out. In case anyone falls to similar situations where Eclipse is the IDE, here is the best approach to solving:

First start with this guide on installing the Facebook SDK https://goo.gl/0XgsyS

If you are using Simplefacebook on top of that follow this guide https://goo.gl/MggSGE

If compilations still occur verify which version of the facebookSDK is being used, in this case our team was using a specific depreciated version of facebookSDK, so downloading from facebook's developer site wasn't helping, nor sromku's simple facebook repository. I ended up tracking the right member of the team down and having him email me both facebook and simplefacebook versions relating to the project.

The last thing that was causing the app to crash was a noobie move, turns out emulated devices don't really have network issues, and in my app's case a constant data connex was needed, else said app would crash. My problem was that the way it was crashing looked similar to a coding issue, so I overlooked testing on a real physical device. Common knowledge in the community but worth re-iterating.