Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build issue #20

Closed
ghost opened this issue Aug 22, 2015 · 12 comments
Closed

Build issue #20

ghost opened this issue Aug 22, 2015 · 12 comments

Comments

@ghost
Copy link

ghost commented Aug 22, 2015

:compileReleaseXtend

WARNING:    Dependencies.xtend - 
15: Unnecessary cast from Settings to Settings

WARNING:    WebAppActivity.xtend - 
316: The constructor ViewConfiguration() is deprecated

WARNING:    DbService.xtend - 
4: The import 'com.tobykurien.webapps.R' is never used.

WARNING:    MainActivity.xtend - 
21: The import 'android.util.Log' is never used.

WARNING:    WebappsAdapter.xtend - 
13: The import 'org.xtendroid.adapter.AndroidAdapter' is never used.

WARNING:    DlgSaveWebapp.xtend - 
10: The import 'java.util.HashMap' is never used.
:generateReleaseSources
:processReleaseJavaRes UP-TO-DATE
:compileReleaseJava/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:35: error: cannot access DrawerLayoutImpl
public class BaseWebAppActivity extends AppCompatActivity {
       ^
  class file for android.support.v4.widget.DrawerLayoutImpl not found
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/webviewclient/WebClient.java:45: error: no suitable constructor found for Builder(BaseWebAppActivity)
      new AlertDialog.Builder(activity)
      ^
    constructor Builder.Builder(Context,int) is not applicable
      (actual and formal argument lists differ in length)
    constructor Builder.Builder(Context) is not applicable
      (actual argument BaseWebAppActivity cannot be converted to Context by method invocation conversion)
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/webviewclient/WebClient.java:93: error: cannot find symbol
         activity.startActivity(i);
                 ^
  symbol:   method startActivity(Intent)
  location: variable activity of type BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/webviewclient/WebClient.java:99: error: cannot find symbol
         activity.startActivity(i);
                 ^
  symbol:   method startActivity(Intent)
  location: variable activity of type BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/webviewclient/WebClient.java:105: error: cannot find symbol
         activity.startActivity(i);
                 ^
  symbol:   method startActivity(Intent)
  location: variable activity of type BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/webviewclient/WebClient.java:118: error: method getSettings in class Dependencies cannot be applied to given types;
      Settings settings = Dependencies.getSettings(activity);
                                      ^
  required: Context
  found: BaseWebAppActivity
  reason: actual argument BaseWebAppActivity cannot be converted to Context by method invocation conversion
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/webviewclient/WebClient.java:159: error: no suitable method found for makeText(BaseWebAppActivity,String,int)
      Toast.makeText(activity, description, Toast.LENGTH_LONG).show();
           ^
    method Toast.makeText(Context,int,int) is not applicable
      (actual argument BaseWebAppActivity cannot be converted to Context by method invocation conversion)
    method Toast.makeText(Context,CharSequence,int) is not applicable
      (actual argument BaseWebAppActivity cannot be converted to Context by method invocation conversion)
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:48: error: cannot find symbol
        super.onCreate(savedInstanceState);
        ^
  symbol:   variable super
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:51: error: cannot find symbol
                getDir("icons", MODE_PRIVATE).getPath());
                                ^
  symbol:   variable MODE_PRIVATE
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:52: error: cannot find symbol
        setContentView(R.layout.webapp);
        ^
  symbol:   method setContentView(int)
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:56: error: cannot find symbol
            finish();
            ^
  symbol:   method finish()
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:60: error: cannot find symbol
        if (getIntent() != null && getIntent().getData() != null
            ^
  symbol:   method getIntent()
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:60: error: cannot find symbol
        if (getIntent() != null && getIntent().getData() != null
                                   ^
  symbol:   method getIntent()
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:61: error: cannot find symbol
                && Intent.ACTION_VIEW.equals(getIntent().getAction())) {
                                             ^
  symbol:   method getIntent()
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:62: error: cannot find symbol
            siteUrl = getIntent().getData();
                      ^
  symbol:   method getIntent()
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:63: error: cannot find symbol
            webappId = getIntent().getLongExtra(EXTRA_WEBAPP_ID, -1);
                       ^
  symbol:   method getIntent()
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:66: error: cannot find symbol
            finish();
            ^
  symbol:   method finish()
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:70: error: cannot find symbol
        CookieSyncManager.createInstance(this);
                                         ^
  symbol:   variable this
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:46: error: method does not override or implement a method from a supertype
    @Override
    ^
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:79: error: cannot find symbol
        super.onResume();
        ^
  symbol:   variable super
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:77: error: method does not override or implement a method from a supertype
    @Override
    ^
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:91: error: cannot find symbol
        super.onPause();
        ^
  symbol:   variable super
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:89: error: method does not override or implement a method from a supertype
    @Override
    ^
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:108: error: cannot find symbol
        String databasePath = this.getApplicationContext().getCacheDir()
                              ^
  symbol:   variable this
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:114: error: cannot find symbol
        String cachePath = this.getApplicationContext().getCacheDir()
                           ^
  symbol:   variable this
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:133: error: cannot find symbol
        settings.setLoadsImagesAutomatically(Settings.getSettings(this)
                                                                  ^
  symbol:   variable this
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:139: error: cannot find symbol
        String userAgent = Settings.getSettings(this).getUserAgent();
                                                ^
  symbol:   variable this
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:173: error: cannot find symbol
                    startActivity(i);
                    ^
  symbol: method startActivity(Intent)
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:201: error: cannot find symbol
        return (ProgressBar) findViewById(R.id.site_progress);
                             ^
  symbol:   method findViewById(int)
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:210: error: cannot find symbol
        return (WebView) findViewById(R.id.site_webview);
                         ^
  symbol:   method findViewById(int)
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:226: error: cannot find symbol
                DbService db = Dependencies.getDb(this);
                                                  ^
  symbol:   variable this
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:236: error: cannot find symbol
            wc = new WebClient(this, wv, pb, unblock.toArray(new String[0]));
                               ^
  symbol:   variable this
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:248: error: cannot find symbol
        int size = Settings.getSettings(this).getIntFontSize();
                                        ^
  symbol:   variable this
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:276: error: cannot find symbol
        return super.onKeyDown(keyCode, event);
               ^
  symbol:   variable super
  location: class BaseWebAppActivity
/home/krt/src/fdroiddata/build/com.tobykurien.webapps/src/com/tobykurien/webapps/activity/BaseWebAppActivity.java:270: error: method does not override or implement a method from a supertype
    @Override
    ^
 FAILED

FAILURE: Build failed with an exception.
@tobykurien
Copy link
Owner

The root cause seems to be this:

class file for android.support.v4.widget.DrawerLayoutImpl not found

Funny enough, if you run the build a second time, it works. I'm trying to figure this out, but currently I'm not sure how to fix this.

@tobykurien
Copy link
Owner

Should work with the work-around. Please re-open if it's still an issue.

@ghost
Copy link
Author

ghost commented Aug 24, 2015

While this fixes the build, fdroid doesn't like binary jar files. Is it created directly from the sdk?

@tobykurien
Copy link
Owner

I extracted the jar file from the support library dependency, i.e. it is already being used in the build, but seems like a bug in the build tool that it doesn't find the jar the first time the build is run. So the alternative is the I can remove the jar, but you will need to run the build twice, as it will fail the first time.

On 24 August 2015 22:45:12 GMT+02:00, Boris Kraut notifications@github.com wrote:

While this fixes the build, fdroid doesn't like binary jar files. Is it
created directly from the sdk?


Reply to this email directly or view it on GitHub:
#20 (comment)

TobyKurien.com | @tobykurien

@tobykurien
Copy link
Owner

@krt16s if I create a build.sh build file, would fdroid use that to build the project? It would do this:

gradle prepareReleaseDependencies
gradle assembleRelease

@untitaker
Copy link

Since FDroid doesn't do any updates, I tried building this myself.

gradle prepareReleaseDependencies
gradle assembleRelease

Those commands give me a completely unsigned apk that is not possible to install. Anything I'm missing?

@ghost
Copy link
Author

ghost commented Sep 20, 2015

@untitaker :
You need to sign apps, see https://developer.android.com/tools/publishing/app-signing.html.

About updates: I do what I can, but my spare time is limited. And sometimes I just forget about all thos github/gitlab/* mails. Sorry.

@tobykurien :
I am not a fan of build.sh files, but we do it on some apps. I can have a look later this week.

@untitaker
Copy link

I actually wanted gradle to just sign it with my debug key (like it works with most apps I built), I figured that I could use gradle -x lint build.

Also @tobykurien your local.properties messes with my SDK installation, I have to remove or modify the path for the installation to work again. I recommend exporting ANDROID_SDK in your profile instead.

@tobykurien
Copy link
Owner

@untitaker to build a debug build use:

gradle prepareDebugDependencies
gradle assembleDebug

@tobykurien
Copy link
Owner

@untitaker sorry about the local.properties, that file isn't meant to be checked in, but it seems I accidentally did. I'll remove it.

@tobykurien
Copy link
Owner

@krt16s thanks, I appreciate it. I'll add a `build.sh``. Unfortunately my hands are tied on this issue, until xtext/xtend-gradle-plugin#32 is solved.

@tobykurien
Copy link
Owner

FYI, I have added the build script and updated to the version of xtend gradle plugin that fixes the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants