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

Perferences #66

Merged
merged 5 commits into from
Apr 7, 2024
Merged

Perferences #66

merged 5 commits into from
Apr 7, 2024

Conversation

wipedlifepotato
Copy link
Contributor

@wipedlifepotato wipedlifepotato commented Mar 10, 2024

Добавлены настройки, изменяющие секции в i2pd.conf

Несколько коммитов назад было не полностью рабочим, из-за не существующей секции для general опций. Сейчас данная проблема отсутствует.

@wipedlifepotato
Copy link
Contributor Author

wipedlifepotato commented Mar 12, 2024

Лучше с поддержкой [секция] сделать.

UPD: Не актуальный

@wipedlifepotato
Copy link
Contributor Author

wipedlifepotato commented Mar 12, 2024

Ini4j выдает ошибку, при попытке спарсить

Exception in thread "main" org.ini4j.InvalidFileFormatException: parse error (at line: 1): port=13948
  at org.ini4j.spi.AbstractParser.parseError(AbstractParser.java:53)

Вместо удаления файла старого, его можно переименовывать или предупреждать перед удалением, получить согласие и только потом удалять

UDP: Не актуально, но сохраняет предыдущий конфиг, на всякий случай

@r4sas
Copy link
Member

r4sas commented Mar 14, 2024

Какой статус правок в общем? Готово к тестам?

@wipedlifepotato
Copy link
Contributor Author

wipedlifepotato commented Mar 15, 2024

На телефоне сейчас эта версия. И меняются в i2pd.conf значения при нажатии в меню

Может быть баг из-за без секционных параметров. Из-за того что general options без секции, при условии существования конфигурации до этого

@wipedlifepotato
Copy link
Contributor Author

wipedlifepotato commented Mar 15, 2024

Вроде, баг исправлен

app/src/main/java/org/purplei2p/i2pd/ForegroundService.java
Эти изменения, попытка заставить силой работать в фоновом режиме. Могу вернуть как было

UPD: изменено на то как было

@wipedlifepotato
Copy link
Contributor Author

wipedlifepotato commented Mar 15, 2024

user@computer:~/i2pd-android$ ./gradlew assembleDebug

BUILD SUCCESSFUL in 4s
39 actionable tasks: 9 executed, 30 up-to-date
user@computer:~/i2pd-android$ adb push /etc/i2pd/i2pd.conf /sdcard/i2pd
/etc/i2pd/i2pd.conf: 1 file pushed, 0 ...pped. 0.2 MB/s (10181 bytes in 0.044s)
user@computer:~/i2pd-android$ adb install app/build/outputs/apk/debug/i2pd-2.50.2-universal-debug.apk 
Performing Streamed Install
Success
user@computer:~/i2pd-android$ 

@wipedlifepotato
Copy link
Contributor Author

#66 (comment)
Теперь можно тестить

@wipedlifepotato
Copy link
Contributor Author

@r4sas
Copy link
Member

r4sas commented Mar 16, 2024

У меня lint орёт. Пробовал собрать release билд?

> Task :i2pd:lintVitalRelease FAILED
i2pd-android/app/build.gradle: Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don't have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

   Explanation for issues of type "DuplicatePlatformClasses":
   There are a number of libraries that duplicate not just functionality of
   the Android platform but using the exact same class names as the ones
   provided in Android -- for example the apache http classes. This can lead
   to unexpected crashes.

   To solve this, you need to either find a newer version of the library which
   no longer has this problem, or to repackage the library (and all of its
   dependencies) using something like the jarjar tool, or finally, rewriting
   the code to use different APIs (for example, for http code, consider using
   HttpUrlConnection or a library like okhttp).

1 errors, 0 warnings


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':i2pd:lintVitalRelease'.
> Lint found fatal errors while assembling a release target.
  
  Fix the issues identified by lint, or create a baseline to see only new errors:

  android {
      lint {
          baseline = file("lint-baseline.xml")
      }
  }

  
  For more details, see https://developer.android.com/studio/write/lint#snapshot

app/build.gradle Outdated
@@ -5,6 +5,8 @@ plugins {
dependencies {
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
// implementation 'org.ini4j:ini4j:0.5.4'
implementation 'org.apache.commons:commons-configuration2:2.7'
Copy link
Member

@r4sas r4sas Mar 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не слишком старая?
add: подними до 2.9.0.

@@ -5,6 +5,8 @@ plugins {
dependencies {
implementation 'androidx.core:core:1.9.0'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.1.0'
// implementation 'org.ini4j:ini4j:0.5.4'
implementation 'org.apache.commons:commons-configuration2:2.7'
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
configurations {
all {
exclude module: 'httpclient'
exclude module: 'commons-logging'
}
}

@r4sas
Copy link
Member

r4sas commented Mar 17, 2024

У меня падает при попытке открыть с имеющимся конфигом. Лог подобный:

FATAL EXCEPTION: main
Process: org.purplei2p.i2pd, PID: 10850
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/commons/logging/impl/NoOpLog;
 at org.apache.commons.configuration2.io.ConfigurationLogger.newDummyLogger(ConfigurationLogger.java:97)
 at org.apache.commons.configuration2.AbstractConfiguration.initLogger(AbstractConfiguration.java:1359)
 at org.apache.commons.configuration2.AbstractConfiguration.<init>(AbstractConfiguration.java:123)
 at org.apache.commons.configuration2.AbstractHierarchicalConfiguration.<init>(AbstractHierarchicalConfiguration.java:168)
 at org.apache.commons.configuration2.BaseHierarchicalConfiguration.<init>(BaseHierarchicalConfiguration.java:82)
 at org.apache.commons.configuration2.BaseHierarchicalConfiguration.<init>(BaseHierarchicalConfiguration.java:73)
 at org.apache.commons.configuration2.BaseHierarchicalConfiguration.<init>(BaseHierarchicalConfiguration.java:61)
 at org.apache.commons.configuration2.INIConfiguration.<init>(INIConfiguration.java:248)
 at org.purplei2p.i2pd.MainPreferenceActivity.readConfiguration(MainPreferenceActivity.java:415)
 at org.purplei2p.i2pd.MainPreferenceActivity.onCreate(MainPreferenceActivity.java:37)
 at android.app.Activity.performCreate(Activity.java:8012)
 at android.app.Activity.performCreate(Activity.java:7996)
 at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1309)
 at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3485)
 at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3676)
 at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
 at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
 at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
 at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2144)
 at android.os.Handler.dispatchMessage(Handler.java:106)
 at android.os.Looper.loop(Looper.java:223)
 at android.app.ActivityThread.main(ActivityThread.java:7753)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:612)
 at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:997)
Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.impl.NoOpLog
 ... 25 more

@wipedlifepotato
Copy link
Contributor Author

wipedlifepotato commented Mar 18, 2024

user@computer:~/i2pd-android$ ./gradlew AssembleRelease

BUILD SUCCESSFUL in 15s
52 actionable tasks: 12 executed, 40 up-to-date
user@computer:~/i2pd-android$ adb install app/build/outputs/apk/release/i2pd-2.50.2-armeabi-v7a-release.apk 
Performing Streamed Install
Success

@wipedlifepotato
Copy link
Contributor Author

wipedlifepotato commented Mar 20, 2024

В настоящий момент, вылетов/критических недоработок у себя не обнаружил. У вас как? Нашли время посмотреть изменения?

@r4sas
Copy link
Member

r4sas commented Mar 22, 2024

Пока что нет, времени не хватает.

@r4sas
Copy link
Member

r4sas commented Apr 7, 2024

Вроде всё нормально. Мёржу.

@r4sas r4sas merged commit cf5fe2e into PurpleI2P:master Apr 7, 2024
2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants