“ pod init”失败,并显示“找不到Gemfile或.bundle /目录

时间:2018-07-17 22:38:20

标签: ios xcode

我正在尝试使用pod init创建Podfile,但每次都会失败,并显示错误的错误消息

  

找不到Gemfile或.bundle /目录

我只是想让我的XCode项目启动并运行。

1 个答案:

答案 0 :(得分:0)

经过大量搜索之后,最简单的答案是最好的:我在Xcode项目目录中创建了文件“ Gemfile”,并在其中添加了单行Gson gson = new GsonBuilder() .registerTypeAdapter(Credits.class, CreditsJsonDeserializer.instance()) .create(); retrofit = new Retrofit.Builder() .baseUrl(Constants.URL_HOST) .client(okHttpClient.build()) .addConverterFactory(GsonConverterFactory.create(gson)) .addCallAdapterFactory(RxJava2CallAdapterFactory.create()) .build(); 。然后,我可以按通常方式安装其他cocoapods。不知道最初的问题是什么,但这已经解决了。

相关问题