小编Vam*_*lli的帖子

React-native debug apk

如何获得react-native app的调试版本.对于apk的发布版本,我使用> cd android && ./gradlew assembleRelease.生成的apk将存储在app/build/outputs/apk中.

是否有这样的命令来生成apk的调试版本?请告诉我它存储的路径.

谢谢.

reactjs react-native

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

使用离子框架从android中的图库中显示图像

你好我正在尝试开发Android应用程序来加载图像库中的图像.这是代码snipet.我无法显示图像.有人可以指出我哪里出错了吗?

*.html的

<ion-view title="Account">
  <ion-content class="has-header padding">
    <h1>Upload Image</h1>
      <div class="account-picture">
          <button ng-click="ShowPictures()">Select Picture</button>
          <img src="ImageURI" id="smallimage">
          <input type="text" ng-model="ImageURI" size="30"/>
      </div>
  </ion-content>
</ion-view>
Run Code Online (Sandbox Code Playgroud)

Controller.js

.controller('AccountCtrl', function($scope) {

    $scope.ImageURI = 'Select Image';
    function UploadPicture(imageURI) {

        $scope.ImageURI =  imageURI;
        alert($scope.ImageURI );
    }

    $scope.ShowPictures = function() {
        navigator.camera.getPicture(UploadPicture, function(message) {
                alert('get picture failed');
            }, {
                quality: 50,
                destinationType: navigator.camera.DestinationType.FILE_URI,
                sourceType: navigator.camera.PictureSourceType.PHOTOLIBRARY
            }
        );
    };
});
Run Code Online (Sandbox Code Playgroud)

在这里ia ImageURI我正在接收afetr从图库中选择任何文件:content:// media/external/images/media/17.我盲目地为我的图像src硬编码了这个值.但我没有看到任何.这里有什么输入?

此外,ImageURI也没有绑定我的文本框.警报正确显示URI.

它看起来非常直接使用普通的phonegap应用程序.但我不喜欢离子框架.

phonegap-plugins cordova ionic-framework

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