小编Jae*_*ger的帖子

从Google云端硬盘获取可流式链接[代码已准备就绪,访问被拒绝]

我正在尝试重复从Google云端硬盘获取可下载链接的过程,就像在Internet下载管理器(Windows)中使用的那样.

我正在做以下事情:

  1. 下载链接的HTML源代码.
  2. 使用正则表达式搜索fmt_stream_map.
  3. 解码.
  4. 试图达到链接.
  5. 拒绝访问.

在Internet下载管理器中使用相同的方法,并且它运行良好.我正在使用我的手机获取链接,并通过手机访问它.所以基本上它是相同的IP和相同的设备.

我的代码首先下载源代码.搜索地图列表,然后将质量及其描述存储在数组中.之后,我搜索链接的fmt_stream_map,并将它们添加到final中model,以便轻松访问它们.

我有3个类,其中两个是模型,最后一个是此过程的主类.

public class ItemStreamList {

    private String quality;
    private String description;

    public ItemStreamList(){

    }

    public ItemStreamList(String quality, String description){
        this.quality = quality;
        this.description = description;
    }

    public String getQuality() {
        return quality;
    }

    public void setQuality(String quality) {
        this.quality = quality;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
}





public class ItemLink {

    private String quality;
    private …
Run Code Online (Sandbox Code Playgroud)

java android

7
推荐指数
1
解决办法
269
查看次数

好奇心向下/向上滑动动画和片段根据帖子日期填充

**简而言之:我想要gif中显示的滚动动画,当用户向下/向上滑动它直接进入项目时,它就像一个动画片.

对于Date片段,我猜它是a horizontal Recyclerview.

我看起来是一个答案是,滚动动画的代码示例,以及做日期事物的方法,我可以根据日期自动填充片段.

我之前已经问过这个问题并且问题不是那么清楚.这个应用程序包括向下滑动/向上风格.

当你向下或向上滑动时,应用程序不会让你像普通的Scrollview一样滑动,而是从第一次触摸(例如)它导航到下一篇文章.

重要说明是完整尺寸的帖子/项目(项目布局match_parent?).

此外,每个帖子都有一个日期,并且该应用程序包含一个日历,当您向左或向右滑动时,您导航到日期并根据您获得帖子的日期.

我想要的,提示或方法来做这样的事情.我想提供一个代码,但我试图在脑海里画上一条路但却无法用合乎逻辑的方式思考.

对于片段,我猜他们正在考虑now日期和帖子中最早的日期,并且基于他们制作(循环)片段,每个片段必须根据日期加载帖子(查询到API)给日期作为参数?).

无论如何,这是应用程序的GIF,它解释了我在说什么.我将为这个问题设置一个赏金,因为我渴望在我的应用程序中实现这样的功能.

https://gfycat.com/JadedMenacingAmericanalligator

android android-fragments

6
推荐指数
1
解决办法
172
查看次数

在json中获取Google Drive视频流

我知道这个问题已经得到了很多回答,我有一个脚本可以获得谷歌驱动器视频的下载链接,它运行良好,但链接无法正常工作.我见过一个有这个功能的应用程序,它的输出是:

https://redirector.googlevideo.com/videoplayback?api=GameLife&id=a4f79817c6ef67f8&itag=59&source=webdrive&requiressl=yes&ttl=transient&mm=30&mn=sn-n4v7kne7&ms=nxu&mv=u&pl=33&sc=yes&ei=sR8jWbqLHoGbqwX595ioDw&driveid=0B4sZ0D2_HqvbSjJWLW8wZTRXN00&mime=video/mp4&lmt=1486066497769085&mt=1495473955&ip=2600:3c01::f03c:91ff:fe1f:fc40&ipbits=0&expire=1495488497&sparams=ip,ipbits,expire,id,itag,source,requiressl,ttl,mm,mn,ms,mv,pl,sc,ei,driveid,mime,lmt&signature=8AFB0862FB9AB02C64544F9F462D7040303A1E04.80FD021C0481D93E50E842705E9B97F11617954A&key=ck2&??/Gemo.mp4
Run Code Online (Sandbox Code Playgroud)

奇怪的是,api链接中的那个参数.有没有这样的官方API,让我可以获取视频的下载链接或"流媒体"链接?

json google-drive-api

6
推荐指数
0
解决办法
718
查看次数

带Multidex和Kitkat的Okhttp.Builder中的ExceptionInInitializerError

我在ExceptionInInitializerError启用Multidex 的情况下运行Kitkat 4.4.2的VM上遇到异常。

java.lang.ExceptionInInitializerError
    at okhttp3.OkHttpClient.newSslSocketFactory(OkHttpClient.java:263)
    at okhttp3.OkHttpClient.<init>(OkHttpClient.java:229)
    at okhttp3.OkHttpClient$Builder.build(OkHttpClient.java:1015)
    at myapp.utils.Utils.getHttpClientBuilder(Utils.java:131)
    at myapp.fragments.FragmentHome.getHome(FragmentHome.java:326)
    at 
myapp.fragments.FragmentHome.onViewCreated(FragmentHome.java:135)
Run Code Online (Sandbox Code Playgroud)

我有以下库:

implementation 'jp.wasabeef:recyclerview-animators:3.0.0'
implementation 'com.ashokvarma.android:bottom-navigation-bar:2.1.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'
implementation 'com.ogaclejapan.smarttablayout:utils-v4:2.0.0@aar'
implementation 'com.duolingo.open:rtl-viewpager:1.0.3'
implementation 'com.squareup.retrofit2:retrofit-converters:2.5.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.14.1'
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'org.jsoup:jsoup:1.11.3'
implementation 'saschpe.android:customtabs:2.0.0'
Run Code Online (Sandbox Code Playgroud)

我正在使用此代码创建改造连接

Retrofit retrofit = new Retrofit.Builder()
            .baseUrl(Constants.API_LINK)
            .addConverterFactory(GsonConverterFactory.create())
            .client(Utils.getHttpClientBuilder())
            .build();
Run Code Online (Sandbox Code Playgroud)

并使用此代码获取构建器的实例

public static OkHttpClient getHttpClientBuilder(){
    return new OkHttpClient.Builder()
            .readTimeout(60, TimeUnit.SECONDS)
            .connectTimeout(60, TimeUnit.SECONDS)
            .addInterceptor(new HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
            .build();
}
Run Code Online (Sandbox Code Playgroud)

getHttpClientBuilder()方法中调用“ build()”时会发生异常。

我还在AndroidManifest.xml中分配了一个默认应用程序,它进行了扩展MultiDexApplication并包含MultiDex.install(this);在中onCreate(Bundle bundle) …

java android retrofit2 okhttp3

6
推荐指数
2
解决办法
630
查看次数

向用户显示“此应用程序试图攻击其他移动和计算机系统”警告

我为 Android 开发了一个应用程序,但它在 Google Play 上不可用(客户端不想要)。尽管如此,播放保护开始向用户显示警告(在标题中)。

我已多次检查图书馆并已发送电子邮件,但未收到任何回复。我很感激关于这个问题的任何帮助,因为该应用程序基本上是一个本地新闻应用程序(政治),它与任何病毒或任何利用无关。

以下是使用的依赖项列表:

dependencies {
    testImplementation 'junit:junit:4.13-beta-3'
    androidTestImplementation('androidx.test.espresso:espresso-core:3.2.0', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    implementation 'com.github.HaarigerHarald:android-youtubeExtractor:master-SNAPSHOT'
    implementation 'net.cachapa.expandablelayout:expandablelayout:2.9.2'
    implementation 'com.r0adkll:slidableactivity:2.1.0'
    implementation 'androidx.legacy:legacy-support-v13:1.0.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'com.google.android.material:material:1.2.0-alpha06'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'
    implementation 'androidx.browser:browser:1.2.0'
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'jp.wasabeef:picasso-transformations:2.2.1'
    implementation 'com.orhanobut:logger:2.2.0'
    implementation 'androidx.recyclerview:recyclerview:1.2.0-alpha02'
    implementation 'jp.wasabeef:recyclerview-animators:3.0.0'
    implementation 'com.ashokvarma.android:bottom-navigation-bar:2.2.0'
    implementation 'androidx.preference:preference:1.1.1'
    implementation 'com.ogaclejapan.smarttablayout:utils-v4:2.0.0@aar'
    implementation 'com.duolingo.open:rtl-viewpager:1.0.3'
    implementation('com.squareup.retrofit2:converter-gson:2.5.0') {
        exclude group: 'org.apache.commons', module: 'commons-io'
    }
    implementation('com.squareup.retrofit2:retrofit-converters:2.5.0') {
        exclude group: 'org.apache.commons', module: 'commons-io'
    }
    implementation 'com.squareup.okhttp3:logging-interceptor:4.0.0'
    implementation 'com.squareup.okhttp3:okhttp:4.0.0'
    //3.12.0
    implementation …
Run Code Online (Sandbox Code Playgroud)

google-play

6
推荐指数
1
解决办法
139
查看次数

java.lang.IllegalStateException:两个不同的 ViewHolder 具有相同的稳定 ID

我的应用程序中出现以下错误:

java.lang.IllegalStateException: Two different ViewHolders have the same stable ID. Stable IDs in your adapter MUST BE unique and SHOULD NOT change.
ViewHolder 1:ViewHolder{c7b44d1 position=5 id=3, oldPos=-1, pLpos:-1 not recyclable(1)} 
View Holder 2:ViewHolder{67232f6 position=3 id=3, oldPos=-1, pLpos:-1}
Run Code Online (Sandbox Code Playgroud)

我正在使用 Mike @github 的 MaterialDrawer,这是我的视图示例:

public class FavoritesViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener{

TextView Title;
ImageView Pic;

public FavoritesViewHolder(View itemView) {
    super(itemView);
    itemView.setOnClickListener(this);
    Title = (TextView) itemView.findViewById(R.id.textViewHighlight);
    Pic = (ImageView) itemView.findViewById(R.id.imageViewHighlight);

   }
}
Run Code Online (Sandbox Code Playgroud)

两个片段正在切换它们的布局,当我按下第一个片段时,它加载没有任何问题,当我按下第二个片段时,它加载不同的布局和 FC 本身。

两个片段使用相同的 ViewHolder 代码,但在不同的类中。

java android android-fragments

5
推荐指数
1
解决办法
6661
查看次数

安装 quill-image-resize-module 会在其中创建包含许多模块的“node_modules”

我正在尝试通过 NPM 安装quill-image-resize-module。我已经尝试过这些命令npm install --save quill-image-resize-module,,npm install quill-image-resize-modulenpm install -g quill-image-resize-module

所有这些都导致了相同的结果。结果是,quill-image-resize-module在 内部创建文件夹node_modules,然后node_modules在 内部创建另一个文件夹quill-image-resize-module。在这个新的子文件夹中node_modules,创建了许多文件夹,例如acorn,,,array-uniqlodash

总结一下这个问题,NPM 没有安装该软件包,而是下载了许多软件包并将它们放入quill-image-resize-module. 因此,我无法导入该包。

import ImageResize from 'quill-image-resize-module'
Run Code Online (Sandbox Code Playgroud)

这会导致错误。该包确实存在,但没有文件。它有另一个子文件夹,里面有许多其他文件夹。

根据老专业的回答记录:

ERROR in ./resources/js/app.js
Module not found: Error: Can't resolve 'quill-image-resize-module' in 'C:\xampp\htdocs\myapp\resources\js'
 @ ./resources/js/app.js 112:0-36
 @ multi ./resources/js/app.js ./resources/sass/app.scss
Run Code Online (Sandbox Code Playgroud)

node.js npm

5
推荐指数
1
解决办法
4670
查看次数

Laravel Sail Docker - 继承 ArrayAccess 期间

Windows 11、Laravel v8.49.0、使用 Ubuntu-20.04 的带有 WSL 2 的 Docker。(已尝试使用 PHP 7.4.x、8.0.x 和 8.1.x)。

问题:

PHP Fatal error:  During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with Ar
rayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/html/vendor/laravel/framework/src/Illuminate/C
ollections/Collection.php:1459
Run Code Online (Sandbox Code Playgroud)

设置:

  • 跑步bash ./vendor/bin/sail up
  • mysql开始使用
  • PHP 出现致命错误
  • Docker 重试,输出相同

老实说,我找不到相关问题,所以决定在这里发帖。我已添加sail到现有项目中,但无法进行全新安装,因为该项目已超出该阶段。

完整的堆栈跟踪:

laravel.test_1  | Stack trace:
laravel.test_1  | #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Collections/Collection.php(13): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
laravel.test_1  | #1 /var/www/html/vendor/composer/ClassLoader.php(478): include('...')
laravel.test_1 …
Run Code Online (Sandbox Code Playgroud)

php laravel docker laravel-sail

5
推荐指数
0
解决办法
5559
查看次数

stack = java.lang.StackOverflowError:堆栈大小为8MB

我得到这个StackOverFlow错误,我完全理解它,但问题是我不处理大数据,那么如何产生这个错误呢?

我有一个活动,Framelayout,一个片段,3个选项.

在片段中,当你单击其中一个选项时,它会重新创建片段并放置随机数,MAX是15,所以它不是那么大,当用户点击这么快的选项导致这个溢出时会发生这个错误.

这是生成的代码,有关"增强"它的任何想法吗?我不知道这个代码对于momery使用是否是一种不好的做法.

private static List<Integer> SavedNumbers;

public static void SetupSavedNumbersLIst(){
    SavedNumbers = new ArrayList<>();
}


static List<Integer> range;
private static void AddDiff(int mMAX){
    range = new ArrayList<>();
    for(int i = 0 ; i < mMAX ; i++){
        range.add(i);
    }

    range.removeAll(SavedNumbers);
}

private static int ReturnIfDuplic(int mMAX){
    AddDiff(mMAX);
    return new Random().nextInt(range.size());
}


public static int ReturnUniqueSavedNumber(int mMAX){
    int Random = ReturnRandom(mMAX);
    if(SavedNumbers != null && SavedNumbers.size() > 0) {
        if(DoesSavedNumberExist(Random)){
            return ReturnIfDuplic(mMAX);
        } else {
            SavedNumbers.add(Random);
            return …
Run Code Online (Sandbox Code Playgroud)

java stack-overflow android android-fragments

-1
推荐指数
1
解决办法
7994
查看次数